objective c - iOS Keyboard Accessory View: barbuttonitem touch events not working normally -
objective c - iOS Keyboard Accessory View: barbuttonitem touch events not working normally -
i have input accessory view attached keyboard. accessory view uitoolbar, includes 4 interactive uibarbuttonitems, noninteractive uibarbuttonitem consists of uilabel, , fixed , flexible spaces. specifically, array of items is:
@[prevbutton, nextbutton, flexspace, labelitem, flexspace, camerabutton, fixedspace, morebutton]
everything works you'd expect... except nextbutton. prevbutton , nextbutton items both initialized follows:
uibarbuttonitem *nextbutton = [[uibarbuttonitem alloc] initwithimage: [uiimage imagenamed:@"rightarrow.png"] style:uibarbuttonitemstyleplain target:self action:@selector(activatenextfield)];
(only difference prevbutton uses different .png , calls different selector)
but when accessory view comes up, nextbutton item acts strangely. receives taps on left , right edges, if tap dead-center, doesn't fire selector.
the problem occurs in ios 7 only.
is there way figure out object is receiving tap? or issue else has come across? it's got me stumped.
update: -- haven't figured out underlying problem, did @ to the lowest degree find (weird) workaround...
when scheme ios 7, following:
nextbutton.width = 30.0; nextbutton.imageinsets = uiedgeinsetsmake(0,-20,0,0);
...and magically seems work fine.
would still much figure out why going on, though. solution feels quite hackish.
ios objective-c cocoa-touch uigesturerecognizer
Comments
Post a Comment