iOS dev iOS dev - 4 months ago 77
iOS Question

objective c how to set exclusive touch for all UIbuttons on the whole app

My app has many buttons through out the application

I want to set Exclusive Touch all of them together at one time. or all views in the app

we can set individually by

[button setExclusiveTouch:YES];


But i want to set at a time for all the buttons in the application

Can we set all view exclusive touch ?

any body have any idea please suggest me.

Answer

You can try this

// Not tested
for (UIView * button in [myView subviews]) {
    if([button isKindOfClass:[UIButton class]])
        [((UIButton *)button) setExclusiveTouch:YES];
}
Comments