Custom size for Modal View loaded with Form Sheet presentation

前端 未结 10 786
予麋鹿
予麋鹿 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:15

    Erich's post worked for me, but on iOS 10 with Swift 3, I had to use:

    self.preferredContentSize = CGSize(width, height)
    

    I too placed it in viewdidload

    Also, like avdyushin said, I had to check the Use Preferred Explicit Size box.

提交回复
热议问题