Iphone 删除按钮后,是否可以向按钮单击添加相同的方法?
从按钮中删除目标后,按此代码单击:Iphone 删除按钮后,是否可以向按钮单击添加相同的方法?,iphone,objective-c,uibutton,Iphone,Objective C,Uibutton,从按钮中删除目标后,按此代码单击: [answer1 removeTarget:self action:@selector(answerSelected:) forControlEvents:UIControlEventTouchUpInside]; 是否可以将相同的方法添加到相同的按钮单击中?在删除按钮后,将方法添加到按钮中没有问题 [answer1 addTarget:self action:@selector(answerSelected:) forControlEvents:UICo
[answer1 removeTarget:self action:@selector(answerSelected:) forControlEvents:UIControlEventTouchUpInside];
是否可以将相同的方法添加到相同的按钮单击中?在删除按钮后,将方法添加到按钮中没有问题
[answer1 addTarget:self action:@selector(answerSelected:) forControlEvents:UIControlEventTouchUpInside];