The structure of Xcode documents
As above, when you open Xcode documents, the whole interface build by left side area, and right side content area. You can choose different documents sets from left side area. Normally your Xcode documents includes some iOS documents sets, some Mac OS X documents sets, and a Xcode documents set.
If the documents set you want isn’t available here, you can choose Preferences menu of Xcode, the choose Downloads -> Documentation. You can find installed documents sets, undownloaded documents sets, you can free choose what you want. Like blow:
Then look at left side of the content are, this is the structure of a documents set, as blow:
First is Resource Types, all the articles in documents set must be one of the types:
- Getting Started — It is for the totally beginner. Recommend all beginners read them, there are some articles to help you establish the basic concepts, will make your next steps more easier.
- Guides — It is the best part of the documents, if you know how to read guides, you don’t need buy any books. Guides of Xcode documents, is a kind of step by step articles, tell you how to solve a problem, how to use a framework of Cocoa, how to understand the system, and so on. Programmers are familiar with reference, it is just like a dictionary. But reference normally is fragment knowledge, you need something to connect the dots, to get the big picture, guides will help you to do it.
- Reference — It is just like a dictionary, when you try to find detail information of a class, a method or a function, you look at their reference pages.
- Release Notes — It will tell you what is new in a new iOS/Mac version, the new features, new APIs, new way to do something. When you try to learn new system, compare different APIs in different version, you may want check them.
- Sample Code — Apple provide a lot of codes, help you understand APIs and technologies. Strong Recommend you look into them. Sometimes if you only read documents, you can’t get everything. And all these codes is written by Apple engineers, you can learn from masters, and follow the trends of code style.
- Technical Notes — There are a lot of technical articles, you may want read it when you have some free time.
- Technical Q&A — Frequently asked questions and answers.
- Video — Mainly WWDC videos. Strong Recommend you watch, if you want to dig deeper.
Normally reference, release notes, sample code, technical notes and Technical Q&A，is for you to search. Getting started and guides is for you to read.
Then is the topics:
- Audio & Video
- Languages & Utilities
- Mathematical Computation
- Data Management
- Graphics & Animation
- Networking & Internet
- User Experience
It is very easy to understand.
Then it is the Frameworks:
- Cocoa Touch Layer
- Media Layer
- Core Services Layer
- Core OS Layer
Types, topics and frameworks is three different dimensions to help understand and locate the documents you want.
Now look at the right of content area. On the top is a document filter, as blow:
For example, if you want read guides about performance, you may want select Topics -> Performance from the left side, then type “Guides” in the document filter. Or you can select Resource Types -> Guides from left, and type Performance in the document filter.
How to read guides
- Start Developing iOS Apps Today
- Your First iOS App
- Your Second iOS App: Storyboards
- Your Third iOS App: iCloud
- iOS Technology Overview
- iOS Human Interface Guidelines
- Learning Objective-C: A Primer
- Programming with Objective-C
- iOS App Programming Guide
- View Programming Guide for iOS
- View Controller Programming Guide for iOS
- Table View Programming Guide for iOS
You may want start with “Start Developing iOS Apps Today“, this is a very easy article, but it will help you establish the basic concepts. All the concepts you will meet when you develop your app, you can find in it. And all the articles in the “related articles” section in the bottom of every page, is needed to read.
A lot of iOS developers, even long time developers, have some misunderstandings about some basic concepts. Modern developing is easier and easier, tools are stronger and stronger, even when you have some misunderstandings, you can still do some works. But if you don’t build a solid foundation, you will be hurt by it soon, it will cause a lot of trouble.
Purpose and test standard is that you understand most of the concepts in your development works.
Then you may want read “Your First iOS App“, “Your Second iOS App: Storyboards“, and “Your Third iOS App: iCloud“, this series is easy too. You don’t need rush to learn Objective-C/Swift. The method I recommended is step by step. Before you learn system structure, Objective-C/Swift, you can follow the articles, write a simplest App, as your first milestone. During the process, you don’t need worry about any questions, any misunderstanding, just do it first.
This process will help you understand the development tools, Xcode and so on, and give you confidence.
Purpose and test standard is write these three Apps, and build and run them using Xcode.
Then you may want read “iOS Technology Overview“, iOS is not a technology, it is a set of a lot of technologies. When you want an animation effect, you need know you which technology you can choose and which one you should choose, Core Animation or OpenGL? When you want to some work related text, if you need Core Text or not? Want understand this kind problems, you need read this article.
Learn modern programming language, framework is as important as language itself. Only when you understand the frameworks structures, then you can easily find what you want when you work.
Purpose and test standard is that you know where to find you information about frameworks.
Then you must read iOS Human Interface Guidelines. There are a mass of all kinds Apps on Mac/iOS, but normally you will find good Apps are familiar and harmonious with the system. Not like Windows or other platforms, why?
It is the “Human Interface Guidelines” culture’s credit. In these articles, Apple talk about what is the best manners of an App, how do you do in your App, to make use feel familiar and harmonious. Apple even give “Human Interface Guidelines” an abbreviation HIG, if you follow HIG, your Apps will look like a Mac/iOS App, act like a Mac/iOS App. You can break HIG, but must after you truly understand it, and follow its spirit.
And read HIG can help you understand UI structures and how UI elements interact each other, so you can design your UI.
Purpose and test standard is when you look at an app, you can identify which part is system controller, which is a self custom controller, and their levels, structures.
Then you may want read “Learning Objective-C: A Primer“, this is the easy one, and the more complex one, “Programming with Objective-C”.
Most people learn language first and recommend this order, but I recommend understand basic concepts first, then make a demo App, then learn the language.
- Modern development normally involve UI interactive and IDE, beginner can not ignore them. You must know you tools, and your problem fields.
- Modern language, normally is combine with some lirbaries, sometimes lirbaries are more important than the language, and more complex.
For example, Delegate and Block are very close to Cocoa UI’s asynchronous mechanism, if you don’t know UI mechanism, you hardly can understand these language elements, or understand their usages.
Purpose and test standard is knowing how to read Objective-C codes.
Then “iOS App Programming Guide”, talk about a complete process of how to develop an App, include App’s lifecycle, execution States, and so on. Must read before you develop you first real app.
Purpose and test standard is knowing a lot of processes and details.
View Programming Guide for iOS and View Controller Programming Guide for iOS are very important. View is the most important concept in iOS/Mac UI. All graphs, UI is based on view. UI no matter how complex normally is built by view, is all kinds of combinations and overlaps of views.
View Controller is view combine with logic codes, this kind combination will remarkably reduce code complexity. You can hardly write correct without knowing View and View Controller.
Purpose and test standard is knowing View and View Controller, and knowing in which circumstance use view, which use view controller.
UITableView is the most important controller, is most useful UI element. Before UICollectionView, most custom list/grid controller is made by UITableView. So read Table View Programming Guide for iOS is very important.
Purpose and test standard is understand UITableView and UITableViewController, knowing how to use them.
After read these articles, you may already can say you know how to write an iOS App. But you almost can read all these articles in one day. It is not very hard, but need some patience, need follow the right method, and need think.
How to find information in documents
The most convenient way to get help even don’t need you type a word. You just need hold Option key, and click the keyword you want to know, you will immediately get quick help, like blow:
Quick help will includes some simple description, available from which version of OS, header file, and reference document. Header file and reference document is clickable.
Even your keyword is not a keyword of Cocoa library, is just a class name or method name from your own codes, you can also get some information, like this:
Another hotkey is Command key + mouse click, editor will just to head files related with a class name or method name.
Another way to get quick help information is to use Quick help inspector, first find the Utilities switch, and find the Quick help inspector switch. Like this:
It function is as long as opened, whichever keyword your input caret at, Quick help inspector will show its information, just like the information from Option key + mouse click, but maybe more rich.
This is search interface, when we search UIImage:
The results is also divided in four types, Reference, System Guides, Tools Guides and Sample Code.
How to read a reference
This is UIImage’s reference:
- Inherits from
- Conforms to
- Declared in
- Related sample code
- Companion guide
And it maybe not very clear, on the top of the interface, it is a navigation bar, you can use it to navigate to different places.