ViewController.h
@interface ViewController : UIViewController @property (readonly, getter=isCancelled) BOOL cancelled; @end
GViewController.h
@interface GViewController : ViewController @property (readwrite, nonatomic, assign, getter = isCancelled) BOOL cancelled; @end
@property这行会显示告警信息,如下:
GViewController.m
@implementation GViewController - (void)viewDidLoad { [super viewDidLoad]; self.cancelled = YES; } @end
运行到 self.cancelled = YES这行,会提示:
解决办法:
问题都找到了,自己想办法吧. -_-
时间: 2024-10-12 22:38:51