@property (nonatomic, assign, getter=isPlaying)BOOL playing;
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
_playView = [PlayView new];
_playView.frame = CGRectMake(30, 40, 40, 40);
_playView.backgroundColor = [UIColor redColor];
[self.view addSubview:_playView];
// UILabel *label = [UILabel new];
// label.attributedText
// label.attributedText
// _playView pl
// self.isPlaying = YES;
self.playing = YES;
// BOOL on = self.playing; //都可以使用
BOOL on = self.isPlaying; <span style="font-family: Arial, Helvetica, sans-serif;">//都可以使用</span>
NSLog(@"the on is %@", on ? @"YES" : @"ON");
}
iOS Property getter
最新推荐文章于 2022-04-13 15:35:04 发布