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

Popular posts from this blog

Line ending issue with Mercurial or Visual Studio -

tags - Jquery Mixitup plugin help prevent handlers being destroyed -

c# - Delving into the world of XML (Windows Phone) Error I dont understand (The ' ' character, hexadecimal value 0x20, cannot be included in a name.) -