OBJECTIVE-C 基礎教學1/5 codeschool
NSLog(@"Hello, Mr. Higgie.");
NSString *firstName = @"Daris";
NSLog(firstNeme);
NSLog(@"Hello there, %@.", firstName);
NSLog(@"%@ %@", firstName, firstName);
NSString *lastName = @"jobs";
NSLog(@"%@ %@", firstName, lastName);
NSNumber *age = @20;
NSLog(@"%@ is %@ years old", firstName, age);
NSArray *apps = @[@"AngryFowl", @"Lettertouch", @"Tweetrobot"];
NSLog(@"%@",apps[1] );
apps = @[@"AngryFowl", @"Lettertouch", @"Tweetrobot", @"Instacanvas"];
NSDictionary *appRatings = @{@"AngryFowl": @3, @"Lettertouch": @5};
NSLog(@"Lettertouch has a rating of %@.", @5);
整理宣告方式:
NSLog(@"Hello, Mr. Higgie.")
NSLog(@"Hello there, %@.", firstName);
NSLog(@"%@ %@", firstName, firstName);
NSLog(@"%@",apps[1] );
NSLog(@"Lettertouch has a rating of %@.", @5);
NSString *lastName = @"jobs";
NSNumber *age = @20;
NSArray *apps = @[@"AngryFowl", @"Lettertouch", @"Tweetrobot"];
NSDictionary *appRatings = @{@"AngryFowl": @3, @"Lettertouch": @5};
Comments
Post a Comment