Overlapping UIView - How to receive touches?

559 Views Asked by At

I'm building an iOS app with an Instagram style center tab (the ones that are raised from the tab bar).

I have my custom view added as a subview to the tabBar, with it's Y value set to -27.0.

The problem I'm having is that only the bottom half of my view receives touches. I've read this question:

UIView. Why Does A Subviews Outside its Parent's Extent Not Receive Touches?

I think this will solve my problem, but I'm a little confused as to where each method goes. Will I need to subclass UITabBarController?

1

There are 1 best solutions below

1
On BEST ANSWER

To answer your question, yes I believe you'll need to create a custom subclass of UITabBar and implement the hitTest and pointInside methods as advised in the answer you linked to.