Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prevent resizing of a view controller presented as a sheet?

Is there a way to prevent a view from being resized if the view controller is presented as a sheet using the method presentViewControllerAsSheet or using a segue of style "sheet"?

Note that modal/show segues can be implanted to a window controller which can be set as non resizable from the storyboard itself. Segues of type popover are non-resizable by default.

resizable sheet

like image 949
ZestyZest Avatar asked May 07 '15 16:05

ZestyZest


1 Answers

Have you tried setting your sheet view controller's -preferredContentSize? Failing that, what about adding width and height NSLayoutConstraints to the view controller's view on -viewDidLoad?

like image 81
Joshua Nozzi Avatar answered Oct 06 '22 00:10

Joshua Nozzi