ios - UIToolbar - Allow interaction below toolbar -


i have custom uitoolbar in uinavigationcontroller, custom background image. image half transparent on right. problem i'm having views have buttons on bottom right , bottom part of buttons cannot tapped because toolbar blocks it.

i cannot set userinteractionenabled = no on uitoolbar, because bar contains uibarbuttonitems need remain interactive.

is there way make bar ignore tap inputs (but not uibarbuttonitems)?

you can set userinteractionenabled = yes on toolbar, override hittest:point described in how touches when parent view has userinteractionenabled set no in ios. makes ignore touches on itself, accept touches on subviews (uibarbuttonitems in case):

- (id)hittest:(cgpoint)point withevent:(uievent *)event {     id hitview = [super hittest:point withevent:event];      if (hitview == self) {         return nil;      } else {         return hitview;     } } 

note require subclass uitoolbar.


Comments

Popular posts from this blog

node.js - Bad Request - node js ajax post -

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -