ios - Embedded TabBarController hit detection bug? -
i may have run bug, or perhaps i'm trying things in way apple doesn't want me to.
i've created github repo single sample project mirrors ui layout of app, different content, shows issue. app should run in simulator ipad air selected. strictly landscape oriented app.
in sample project, haven't written single line of code. i've replicated issue using storyboard. because of this, i'm thinking bug in ios or it's not supposed done way.
in project, have starting uiviewcontroller embedded in uinavigationcontroller. in view controller, have designated space @ top, has simple uilabel in sample project, , container view below taking rest of space.
embedded in container view uitabbarcontroller. tab bar controller links 2 uitableviewcontrollers have static content in them simplicity.
the issue hit detection area of uitabbaritems of uitabbar of tab bar controller. can tap above actual tab bar item (below red line, above tab bar section in image below), not supposed part of tab bar, , switch other table view controller.

in real project issue because cells in table interactive, , when user tries tap on bottom cell , tapping on cell , not tab bar, tab bar "stealing" touch , switching tabs instead.
there's 10 points of vertical space tab bar "stealing" touch input. i've verified in real app making uitapgesturerecognizers table , uitabbar, parent view controller delegate , printing out touch point y value when delegate informed of tap in gesturerecognizer(:shouldreceivetouch) , in gesturerecognizershouldbegin().
in particular sizing, table receives tap point 710. 1 point below that, should 711, reports being captured uitabbar, y value isn't 711, it's 720. continues way 720, actual uitabbar area begins. @ point 721, it's correctly reported gesture recognizer on uitabbar being @ y value 721. entire space between point 711 , 720 dead space. it's supposed detected table it's detected uitabbar instead. makes "dead" space points between 711 , 720 report point 720, can't special case touch points between 711 , 720 map table.
is known thing? theory happens because tab bar controller embedded in container view isn't full size of screen, , don't know if having whole thing embedded in navigation controller has impact or not.
Comments
Post a Comment