调用方法
[object method]; [object methodWithInput:input]; output = [object methodWithOutput]; output = [object methodWithInputAndOutput:input]; id myObject = [NSString string]; NSString* myString = [NSString string];
嵌套消息
function1 ( function2() ); [NSString stringWithFormat:[prefs format]];
多个输入参数的方法
-(BOOL)writeToFile:(NSString *)path atomically:(BOOL)useAuxiliaryFile; BOOL result = [myData writeToFile:@"/tmp/log.txt"atomically:NO];
原文:learn_objective_C part
1
时间: 2024-11-04 00:54:00