ボタンを追加する
- (void)viewDidLoad { [super viewDidLoad]; UIButton *button = [UIButton buttonWithType:UIButtonTypeRoundedRect]; button.frame = CGRectMake(50, 50, 100, 30); [button setTitle:@"click" forState:UIControlStateNormal]; [button addTarget:self action:@selector(changeTextLabel:) forControlEvents:UIControlEventTouchDown]; [self.view addSubview:button]; }