iOS 11.0 上未显示键盘上方的工具栏。它在 <11.0 版本上运行良好。
这是我添加工具栏的代码。那么我应该添加什么以在 iOS 11.0 上显示它:
UIToolbar* customToolBar = [[UIToolbar alloc]initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, 60)];
customToolBar.barStyle = UIBarStyleDefault;
customToolBar.items = [NSArray arrayWithObjects:
[[UIBarButtonItem alloc] initWithTitle:@"+ Contact"
style:UIBarButtonItemStylePlain
target:self
action:@selector(showPicker:)],
[[UIBarButtonItem
alloc]initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace
target:nil
action:nil],
[[UIBarButtonItem alloc] initWithTitle:@"- Contact"
style:UIBarButtonItemStylePlain
target:self
action:@selector(HidePicker:)],
nil];
[customToolBar sizeToFit];
self.textView.inputAccessoryView=customToolBar;