拙作のArrow NoteのiPhone版では、画面を節約するため、標準キーボードの上に文字数などの情報をはみ出して表示しています。その方法を共有します。
ObjectiveC
@interface ViewController : UIViewController
@property IBOutlet UITextView *textView;
@end
@implementation ViewController
- (void)viewDidLoad
{
[super viewDidLoad];
UIView *inputAccessoryView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 44)];
inputAccessoryView.clipsToBounds = NO;
UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 44, 100, 22)];
label.text = @"Hello, World";
[inputAccessoryView addSubview:label];
self.textView.inputAccessoryView = inputAccessoryView;
}
@end