I want to resize a UIViewController
in the storyboard so I can use its UIViewController
as a popover view.
On most sites I can read that the actions are:
UIViewController
in the storyboard UIView
on itBut in my iOS 5.1 this does not work, even with a new project with only one UIViewController
. What did I forget in the procedure?
They are separate classes: UIView is a class that represents the screen of the device of everything that is visible to the viewer, while UIViewController is a class that controls an instance of UIView, and handles all of the logic and code behind that view.
Instead, you subclass UIViewController and add the methods and properties needed to manage the view controller's view hierarchy. A view controller's main responsibilities include the following: Updating the contents of the views, usually in response to changes to the underlying data.
A UIViewController is an object which manages the view hierarchy of the UIKit application. The UIViewController defines the shared behavior and properties for all types of ViewController that are used in the iOS application. The UIViewController class inherits the UIResponder class. ADVERTISEMENT. ADVERTISEMENT.
We follow the following steps to achieve the same:
UIViewController
(this takes a UIView
along with it, so no need to add another UIView
unless you need more)UIViewController
on StoryBoard and set size property to Freeform
UIView
and set the height and width values.If this doesn't help, you might want to delete the UIView
that comes with the UIViewController
, add a fresh UIView
and repeat #2, and #3 above.
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