我在 .m 文件中有此代码:
- (void) viewDidAppear:(BOOL)animated {
// Animations
[UIView animateWithDuration:0.2
delay:0
options:UIViewAnimationCurveEaseInOut
animations:^{
self.Button1.alpha = 1;
}
completion:^ (BOOL finished){}
];
}
但这行给了我错误:
self.Button1.alpha = 1;
它说 :
member reference base type 'void' is not a structure or union
这是什么意思?
更新:这是我的 .h 文件
@interface ViewController : UIViewController
- (IBAction)Button1;
@end