一、注释
/* comment */
// comment
二、变量类型
char,short,int,long,float,double
字符串常量:@"i love you"
布尔型:BOOL
nil = NULL= 0
NSInteger,NSUInteger
NSNumber,NSValue
NSNull
三、NSLog
整形:%i,%o,%#o,%x,%#x,%X,%#X
浮点数:%f,(%e,%g科学记数法)
字符型:%c
四、条件,循环
if else
while
do while
for
for ( in )
五、预处理
#include
#import
#define
常用类:
NSDate,NSCalendar,NSTimeZone
NSHost, NSLocale, NSLocaleCurrencyCode
NSArray,NSMutableArray
NSSet,NSMutableSet
NSDictionary,NSMutableDictionary
NSString, NSMutableString
NSError
NSURL
NSData
代码分节:
#pragma mark <lable name>
#pragma mark -