如何在iOS8自定义键盘上添加工具栏?
我的问题是写图片。 我真的需要你帮忙 也许inputAccessoryView,inputAccessoryViwController可以使用,但我真的不知道。 非常感谢!
您可以使用自动布局调整自定义键盘的主视图的高度。 默认情况下,根据屏幕大小和设备方向,定制键盘的大小以匹配系统键盘。 自定义键盘的宽度始终由系统设置为等于当前屏幕宽度。 要调整自定义键盘的高度,请更改其主视图的高度限制。
以下代码行显示了如何定义和添加这样一个约束:
CGFloat _expandedHeight = 500; NSLayoutConstraint *_heightConstraint = [NSLayoutConstraint constraintWithItem: self.view attribute: NSLayoutAttributeHeight relatedBy: NSLayoutRelationEqual toItem: nil attribute: NSLayoutAttributeNotAnAttribute multiplier: 0.0 constant: _expandedHeight]; [self.view addConstraint: _heightConstraint];
资料来源: https : //developer.apple.com/library/ios/documentation/General/Conceptual/ExtensibilityPG/Keyboard.html
将代码添加到viewDidAppear / viewWillAppear
将您的酒吧添加到额外的空间。 你不能使背景透明。