|
64 | 64 |
|
65 | 65 |
|
66 | 66 | ```Objective-C |
67 | | - // .h文件 |
68 | | - // http://weibo.com/luohanchenyilong/ |
69 | | - // https://github.com/ChenYilong |
70 | | - // 修改完的代码,这是第一种修改方法,后面会给出第二种修改方法 |
| 67 | +// .h文件 |
| 68 | +// http://weibo.com/luohanchenyilong/ |
| 69 | +// https://github.com/ChenYilong |
| 70 | +// 修改完的代码,这是第一种修改方法,后面会给出第二种修改方法 |
71 | 71 |
|
72 | | - typedef NS_ENUM(NSInteger, CYLSex) { |
73 | | - CYLSexMan, |
74 | | - CYLSexWoman |
75 | | - }; |
| 72 | +typedef NS_ENUM(NSInteger, CYLSex) { |
| 73 | + CYLSexMan, |
| 74 | + CYLSexWoman |
| 75 | +}; |
76 | 76 |
|
77 | | - @interface CYLUser : NSObject<NSCopying> |
| 77 | +@interface CYLUser : NSObject<NSCopying> |
78 | 78 |
|
79 | | - @property (nonatomic, readonly, copy) NSString *name; |
80 | | - @property (nonatomic, readonly, assign) NSUInteger age; |
81 | | - @property (nonatomic, readonly, assign) CYLSex sex; |
| 79 | +@property (nonatomic, readonly, copy) NSString *name; |
| 80 | +@property (nonatomic, readonly, assign) NSUInteger age; |
| 81 | +@property (nonatomic, readonly, assign) CYLSex sex; |
82 | 82 |
|
83 | | - - (instancetype)initWithName:(NSString *)name age:(NSUInteger)age sex:(CYLSex)sex; |
84 | | - + (instancetype)userWithName:(NSString *)name age:(NSUInteger)age sex:(CYLSex)sex; |
| 83 | +- (instancetype)initWithName:(NSString *)name age:(NSUInteger)age sex:(CYLSex)sex; |
| 84 | ++ (instancetype)userWithName:(NSString *)name age:(NSUInteger)age sex:(CYLSex)sex; |
85 | 85 |
|
86 | | - @end |
| 86 | +@end |
87 | 87 | ``` |
88 | 88 |
|
89 | 89 |
|
|
0 commit comments