ios - UIButton responds to event outside of frame -


this question has answer here:

i have navigation controller i've added uibutton navigation bar, there's wrong it. if tap way outside of button, still calls it's action.

this how create , add button:

uibutton *backbtn = [uibutton buttonwithtype:uibuttontypecustom]; [backbtn setimage:[uiimage imagenamed:@"btn_back.png"] forstate:uicontrolstatenormal]; [backbtn addtarget:self action:@selector(backpressed:) forcontrolevents:uicontroleventtouchupinside];    [backbtn setframe:cgrectmake(0, 0, 70, 30)];     //[backbtn setframe:cgrectmake(20, 7, 70, 30)];  self.navigationitem.leftbarbuttonitem = [[[uibarbuttonitem alloc] initwithcustomview:backbtn] autorelease]; 

here's tap range of button:

http://www.flickr.com/photos/98950925@n07/9465901718

it default size of left button , right button . can nothing left , right button. because area of left , right button. if wanna custom button in case show given frame it'll work in left button's whole area.


Comments

Popular posts from this blog

matlab - Deleting rows with specific rules -

jquery - How would i go about shortening this code? And to cancel the previous click on click of new section? -