Как обеспечить разные разрешения для изображения заголовка?

Наконец, я получил его, добавьте этот кодовый блок в ваш подкласс 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

0
задан Community 23 May 2017 в 12:28
поделиться