我浏览了 Apple 的指南“您的第一个 iOS 应用程序”
现在我有一个按钮,它没有在 ViewController 中声明:
@interface HelloWorldViewController : UIViewController <UITextFieldDelegate>
- (IBAction)changeGreeting:(id)sender;
@property (weak, nonatomic) IBOutlet UITextField *textField;
@property (weak, nonatomic) IBOutlet UILabel *label;
@property (copy, nonatomic) NSString *userName;
@end
现在我可以使用 [label removeFromSuperview] 删除标签(和 textField);但我不明白如何使用按钮。有人可以帮忙吗?