[size=1em]1 [size=1em]2 | [size=1em][size=1em]@property (nonatomic, strong) NSString *tempStr1; [size=1em]@property (nonatomic, strong) NSString *tempStr2; |
[size=1em]1 [size=1em]2 | [size=1em][size=1em]@synthesize tempStr1; [size=1em]@synthesize tempStr2; |
[size=1em]1 [size=1em]2 [size=1em]3 [size=1em]4 | [size=1em][size=1em]self.tempStr1 = @"hello World"; [size=1em]self.tempStr2 = self.tempStr1; [size=1em]self.tempStr1 = nil; [size=1em]NSLog(@"tempStr2 = %@", self.tempStr2); |
[size=1em]1 | [size=1em][size=1em]tempStr2 = hello World |
[size=1em]1 [size=1em]2 | [size=1em][size=1em]@property (nonatomic, strong) NSString *tempStr1; [size=1em]@property (nonatomic, weak) NSString *tempStr2; |
[size=1em]1 [size=1em]2 | [size=1em][size=1em]@synthesize tempStr1; [size=1em]@synthesize tempStr2; |
[size=1em]1 [size=1em]2 [size=1em]3 [size=1em]4 | [size=1em][size=1em]self.tempStr1 = [[NSString alloc] initWithUTF8String:"hello World"]; [size=1em]self.tempStr2 = self.tempStr1; [size=1em]self.tempStr1 = nil; [size=1em]NSLog(@"tempStr2 = %@", self.tempStr2); |
欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/) | 黑马程序员IT技术论坛 X3.2 |