KVO应用

@interface Person : NSObject
@property (nonatomic, strong, nullable) NSString *firstName;
@property (nonatomic, strong, nullable) NSString *lastName;
@property (nonatomic, strong, readonly) NSString *fullName;
@end

@implementation Person
- (NSString *)fullName {
    return [NSString stringWithFormat:@"%@ %@", self.firstName, self.lastName];
}
@end
©️2020 CSDN 皮肤主题: 数字20 设计师:CSDN官方博客 返回首页