Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

tw002

macrumors newbie
Original poster
Feb 23, 2009
16
0
Hi - I'm not sure whether I'm going the right way about this or if i'm missing something, but here it goes. I'm creating a custom tab bar, and I want each tab to have a target-action attached.

I'm using UIControl as the base class for the tab, but I need to add customisation to the tab - eg. images/labels etc, the problem being that these additional subviews intercept touches, preventing them from reaching the UIControl underneath.

In the past I've been creating the UIControl as a transparent 'overlay' on the tab, and attaching the target-action to this, but this strikes me as a bit inelegant? Is there perhaps a way to tell a view to be 'transparent' to touches, allowing them through, whilst still allowing the view to display content?

Thanks, Thomas.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.