I'm new to iOS 8, I tried to load a UIView from XIB file with auto layout and size classes option are enabled. I use Inferred size XIB with default size is 600 x 600. But on the simulator the size of view is not fit screen size, it still be 600 x 600 and doesn't fit the screen size like this, it's much bigger than the screen on width:
But when I use View Controller widget, it has Resize of NIB option, and it work fine to fit the screen size. Can anybody suggest what should I do to resize UIView to fit screen size? Thank you very much, guys!
You should use autolayout and set constraint. It is better choice if you need to support multiple device.
Try to figure out with these 3 images first. Then I am discussing one by one.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.