ios - Two Controls Events on one UIButton -
in iphone app it's possible add 2 uicontrolevents on 1 unbutton?
i want add touch inside , touch drag exit, tried add touch inside in ib in viewdidload add touch drag exit programmatically using following code:
[btn addtarget:self action:@selector(method:) forcontrolevents:uicontroleventtouchdragexit];
it's work i'm wondering won't cause app crash?!
thanks.
you can add multiple events controls. if have overlapping events, of events might not fire wont crash application.
more event programming: https://developer.apple.com/library/ios/documentation/eventhandling/conceptual/eventhandlingiphoneos/introduction/introduction.html
Comments
Post a Comment