【发布时间】:2012-03-06 10:46:36
【问题描述】:
我浏览了 Apple "Your first iOS app" 的指南
现在我有一个按钮,它没有在 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);但我不明白如何使用按钮。有人可以帮忙吗?
【问题讨论】:
标签: objective-c ios5 uiviewcontroller uibutton xcode-storyboard