I'd like to create a sort of popup view that is displayed in a main controller through custom transitions.
I create the popup viewcontroller into a storyboard and I set its view as freeform, then I resize the view.
My problem is that when I load the view controller using instantiateViewControllerWithIdentifier
the view bounds are always reset to full screen.
Here is the code that I'm using, the popUp size should be 100x100, but from this code I get 320X480.
self.popUp = (PopUpViewController*)[storyBoard instantiateViewControllerWithIdentifier:@"Popup"];
NSLog(@"%@",NSStringFromCGRect(self.popUp.view.bounds));
How can I setup a freeform view controller and load it programmatically with the right size?
Solution at Wrong frame value while accessing the view from storyboard in IOS worked for me.
Uncheck the "Resize View From Nib" box in the inspector. That should give you the correct size for a freeform view controller.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With