1
[_btt1 addTarget:self action:@selector(clicked:) forControlEvents:UIControlEventTouchUpInside];
[_btt1 addTarget:self action:@selector(clicked2:) forControlEvents:UIControlEventTouchUpInside];

There are 2 actions in _btt1.

2013-05-31 10:33:31.300 testTargetAndSelector[6029:c07] actions : (
    "clicked:",
    "clicked2:"
)

I remove clicked2 action like this.

[_btt1 removeTarget:self action:@selector(clicked2:) forControlEvents:UIControlEventTouchUpInside];

but there is no action in _btt1.

2013-05-31 10:33:32.731 testTargetAndSelector[6029:c07] actions : (null)

How can I remove single action from multi Actions?

BluePrajna
  • 31
  • 2
  • Don't know why this happened. But why do you need to remove a target? I think you can do something inside the action rather than remove the action. – yibuyiqu May 31 '13 at 03:40
  • I know that. but it is the easiest and simple way I think, although it has problem. – BluePrajna May 31 '13 at 03:49

0 Answers0