Наконец, я получил его, добавьте этот кодовый блок в ваш подкласс UIInputViewController
. Класс:
override func viewDidAppear(animated: Bool) {
let desiredHeight:CGFloat = 300.0 // or anything you want
let heightConstraint = NSLayoutConstraint(item: view, attribute:NSLayoutAttribute.Height,
relatedBy: NSLayoutRelation.Equal,
toItem: nil,
attribute: NSLayoutAttribute.NotAnAttribute,
multiplier: 1.0,
constant: desiredHeight)
view.addConstraint(heightConstraint)
}
Он будет работать отлично. iOS 8.3