Objective-c is the base language for iOS development, hereafter referred to as OC
1, OC and C language header file differences:
#import: #include一样都是编译预处理指令
#import function is the same as # include to copy the contents of the file to the location of the #import directive
#import <> and #include <> are the header files that are used to include the system.
#import "and #include" "are used to include header files in your own project
#import is a # include upgrade that automatically prevents file duplication
2, Foundation: is the foundation framework
3, @autoreleasepool is a memory management of a thing, roughly know it can be
4. Functions provided by the Nslog:foundation framework for log output
5. Comparison between NSLog and printf
Comparison between NSLog and printf
5.1, printf is provided in the C language, it in the stdio.h header file
5.2, NSLog is provided by the Foundation framework, NSObjCRuntime.h
5.3. NSLog contains the date of the log output, and the corresponding application
5.4, NSLog automatic line, at the end \ n is invalid
5.5. The format string in NSLog is not a normal C-language string, NSString object
@ "" It is a literal representation of a NSString object
5.6. All placeholders in printf are supported in OC
5.7, nslog new format character%@ for the output of the object
6, in the main function, Renturn 0; indicates that the program exited normally.
Objective-c language: First OC program