我的问题是写图片。我真的需要你的帮助。或许inputAccessoryView、inputAccessoryViwController都可以用,但我真的不知道。非常感谢!
问问题
870 次
1 回答
0
您可以使用自动布局调整自定义键盘主视图的高度。默认情况下,自定义键盘的大小会根据屏幕大小和设备方向与系统键盘匹配。自定义键盘的宽度始终由系统设置为等于当前屏幕宽度。要调整自定义键盘的高度,请更改其主视图的高度约束。
以下代码行显示了如何定义和添加这样的约束:
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];
将代码添加到 viewDidAppear/viewWillAppear
将您的酒吧添加到额外的空间。您不能使背景透明。
于 2014-09-26T14:36:12.953 回答