#import <UIKit/UIKit.h> @interface ViewController : UITableViewController @property (weak, nonatomic) IBOutlet UILabel *Label1; - (IBAction)onClick:(id)sender; @end
为了将事件和控件联系到一起,ios引入了动作和输出口的概念: