2

I've read a few questions about it without solving my problem.

I've got a UIViewController subclass as a rootViewController in a UINavigationController, the both are set with the same size of 320x1024 pts with the freeform simulated size. Their owned views have the same size and the checkbox Resize View From Nib is NOT selected.

The UINavigationController is presented using a custom segue, that makes the destination view controller slide in (an animation close to mail app).

If I log or debug the segue code I can see clearly (from the very beginning) that the view size isn't respected and this happens both in the UINavigationController and in its rootViewController, their size is full screen.

I know that I can fix the size inside the segue manually or with constraints, but I'm wondering if I am missing something to preserve the storyboard size. The app should work only on ipad.

Andrea
  • 26,120
  • 10
  • 85
  • 131
  • Simulated metrics ia just that.. simulated. It doesn't actually set the size of your views. – Robert J. Clegg Apr 17 '14 at 06:14
  • @Tander thank you, yep I was guessing the same, but it seems that someone managed successfully this operation http://stackoverflow.com/questions/9728952/resize-of-uiviewcontroller-in-storyboard , but for me doesn't work – Andrea Apr 17 '14 at 12:22
  • Yes, but that was on an iPad (Since iPhone doesn't have popOverViews) and setting the size in Storyboard will probably work fine then. On iPhone - Apple expect all viewControllers to be full screen. Unless they are in containers. – Robert J. Clegg Apr 17 '14 at 13:08
  • Right... need to add a spec: I'm on ipad – Andrea Apr 17 '14 at 13:10
  • Well then, that changes things. I'll take a look tonight and see if I can get it right and pop an answer if I do? – Robert J. Clegg Apr 17 '14 at 13:18
  • Thanks.. I think the main problem is that I'm embedding inside a NavController – Andrea Apr 17 '14 at 14:39
  • A workaround for this is to use xib instead. – Teffi Jul 08 '16 at 07:02

0 Answers0