Objective-c 0.2

Nested Messages
ไม่ควรเขียนซ้อนใน objc เพราะจะทำให้งง มากๆๆๆๆๆๆๆ
Objective c

[NSString stringWithFormat:[prefs format]];



Multi-Input Methods
ประกาศ method แยกชื่อ คือประกาศ ชื่อ method แยกส่วนกันได้

-(BOOL)writeToFile:(NSString *)path atomically:(BOOL)useAuxiliaryFile;

BOOL result = [myData writeToFile:@"/tmp/log.txt" atomically:NO];
public boolean writeToFileAtomically(String path, boolean useAuxiliaryFile);

bool result = myData.writeToFileAtomically("/tmp/log.txt",false);

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s