AutoLayoutBasics
Using Auto Layout in XCode 6 for iOS 7 and 8. How to use storyboard constraints with Compact, Any, Regular Height and Width together with Storyboard Preview Function.
Install / Use
/learn @voyage11/AutoLayoutBasicsREADME
The Basic 15 Auto Layout Position Guides on XCode 6
Before iPhone 6, basically we only have 2 screen sizes: 3.5 inches vs 4.0 inches. There are rumours that the are 2 sizes for iPhone 6: 4.7 inches and 5.5 inches. So starting from iOS 8 which will be released on late 2014, we might have 4 different screen sizes for iPhone.
With the 2 new screen resolution sizes, to be able to develop iOS apps using Auto Layout on storyboard is more important than ever. All the iOS developers will have to learn it sooner or later.
This Auto Layout project is a guide for iOS developers who are trying to learn Auto Layout. The project contains the most basic positions that one single object can be positioned inside a view controller.
An object can have 3 different sizes:-
- The Object has fixed Height and Weight
- The Object has fixed Width but with flexible Height
- The Object has fixed Height but with flexible Width
The only potential object with flexible Width and flexible Height could be scrollview. To attach the scrollview using constraints is normally more straight forward compare with other objects.
The object can be located in 5 different positions:-
- Always at the Center of the SuperView
- Always stick to the Top Layout Guide
- Always stick to the Bottom Layout Guide
- Always stick to the Left side of the SuperView
- Always stick to the Right side of the SuperView
So by doing the math, we will have an object with 3 potential sizes in 5 potential positions, so, we will have a total of 3 x 5 = 15 different potential auto layout guides for one single object in a single view.
For more detail information about Auto Layout on XCode 6, please visit: How to Use Auto Layout in XCode 6 for iOS 7 and 8 Development.
Personal Note
Currently, I am working as a Senior iOS Developer in Singapore. I might not be free to keep this solution updated. Please check the changes on the latest iOS to make sure that the solutions works well. Thanks.
Thanks.
Ricky
Related Skills
node-connect
344.4kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
99.2kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
344.4kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
344.4kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
