摘要:
1. Strings1) 简单字符串NSString *aString = @"this is a string";NSString *anotherString = @"and this is another one";2) 对象初始化NSString *aString = [[NSString alloc] initWithString:@"some string literal"];NSString *aString = [NSString stringWithString:@"some string literal& 阅读全文
摘要:
1. Strings1) 简单字符串NSString *aString = @"this is a string";NSString *anotherString = @"and this is another one";2) 对象初始化NSString *aString = [[NSString alloc] initWithString:@"some string literal"];NSString *aString = [NSString stringWithString:@"some string literal& 阅读全文
摘要:
#import <Foundation/Foundation.h>// --------------------------------------------------@interface Tire : NSObject@end // Tire@implementation Tire- (NSString *) description{ return (@"I am a tire. I last a while");} // description@end // Tire// ----------------------------------------- 阅读全文
摘要:
#import <Foundation/Foundation.h>// --------------------------------------------------// constants for the different kinds of shapes and their colorstypedef enum { kRedColor, kGreenColor, kBlueColor} ShapeColor;// --------------------------------------------------// Shape bounding rectangle... 阅读全文
摘要:
1.In Xcode, choose Product-> Edit Scheme and then click the Arguments tab2As shown in the following screen shot, click the plus sign in the Arguments Passed On Launch section, andtype the launch argument—in this case, the path to the words.txt file 阅读全文