How to fit view controller for all iPhones?
I’m working on some apps and I am seriously sad about setting the viewcontroller. Whenever I try my app on different iPhones it looks so fitful. I just want to see my app automatically resized on all iPhones.
I made an example app to explain better.
This is the iPhone 5 screen
and this is the iPhone 6S screen
- iOS whose view is not in the window hierarchy
- Swift protocol extension method dispatch with superclass and subclass
- Retrieve date and time from UIDatePicker iOS
- get progress from dataTaskWithURL in swift
- IOS 8 Tab Bar Item Background Colour
- IOS 7 - How to get the indexPath from button placed in UITableViewCell
Solutions Collect From Internet About “How to fit view controller for all iPhones?”
You definitely need to use Autolayout. This is the main tool used to dev UI through all iDevices. Here is a good start :
You will also need to use size class which use auto layout but allow you to custom your constraints depending on the idevice :
That’s a lot to learn, but believe me, you’ll have to use that 🙂
- Cocoa Point vs Pixel and PPI
- How do I pass a Swift class to an Objective-C method needing a Class?
- getting breakpoint retrieving addressbook data
- Using Core Location in Apple WatchKit
- GCM certificate configuration not working or iOS
- How to find out who called a method?
- AVURLAsset play photo video operation not permitted by AVPlayer
- How to change button text in Swift Xcode 6?
- How to represent magnitude for mass in Swift?
- Getting profile picture with swift through Facebook Graph API return “unsupported URL”
- how do i alter the position of a UIImage inside a imageView SWIFT
- Better “nothing function” in Swift?
- Deleting all the files in the iPhone sandbox (documents folder)?
- Swift: NSTextField numberStyle not calling action