Content reprinted from theiOS Development Guide 2.6.2 How to use the API Help
It is important for a beginner to learn how to use the API Help documentation in Xcode. Let's take an example to illustrate the use of API help documentation.
When writing the HelloWorld program, we can see the VIEWCONTROLLER.M code, as follows:
@implementation Viewcontroller
-(void) viewdidload
{
[Super Viewdidload];
}
-(void) didreceivememorywarning
{
[Super didreceivememorywarning];
}
@end
I have a lot of confusion about the Didreceivememorywarning method, and I need to find my help documentation myself. If you simply view the help information, you can double-click the Didreceivememorywarning method and select the Quick Help Checker on the right, as shown in 2-41.
Figure 2-41 Xcode Quick Help Checker
In the open Xcode Quick Help Inspector window, you can see a description of the method, including the version of iOS used, related topics, and some related cases. It is necessary to note that if you need to view the official case, download it directly from here.
If you want to query a more complete and comprehensive help document, you can press and hold the ALT key to double-click the Didreceivememorywarning method name, which opens a Xcode API help document, shown in 2-42.
Figure 2-42 Xcode Help window
The API Help documentation also provides us with some official cases where the Select Case opens a new window, shown in 2-43, where you can view the case description. Click the Open Project button to open and download the case project.
How the iOS development Xcode uses the API help