Custom size for Modal View loaded with Form Sheet presentation

前端 未结 10 769
予麋鹿
予麋鹿 2021-02-01 12:44

I\'m trying to load a UIViewController in iPad with Form Sheet presentation. The problem is the size of this new view, i put the size values in the IBuilder but the modal view t

10条回答
  •  粉色の甜心
    2021-02-01 13:37

    For iOS 8, use:

    self.preferredContentSize = CGSizeMake(width, height);
    

    I've placed this in viewDidLoad.

    Swift 3

    self.preferredContentSize = CGSize(width: 100, height: 100)
    

提交回复
热议问题