I have a GUI class extending UIViewController.
In its function viewDidLoad
, I would like to have a UITextField
instance. I would like that instance not aligned as a simple CGRect, setting its offset and width and height, but I want it rather to be resized dynamically, making it fill the whole width of the screen, with an offset of 5px from top, left and right each and a height of 20px. How is that done?
It should maintain the "relatively-absolute" positioning regardless of the device orientation, all orientations being supported.
Maybe there's something like a LayoutManager, as, for instance, GridBagLayout in Java?