tags:

views:

23

answers:

1

Hi,

I've got a situation in an iphone application where buttons are not receiving input as I expect. Here's the setup:

ViewMain - The main view full of various images and labels ViewOverlay - A HUD like overlay view with two UIButton objects.

To create my scene I do the following:

viewController.view = ViewMain [ViewMain addsubview:ViewOverlay]

This view renders as expected, with ViewOverlay correctly rendered ontop of ViewMain. However the two buttons found inside ViewOverlay do not receive touch events and can not be pressed. Tapping them does nothing at all.

I very well may be going about this in the entirely wrong direction. Any ideas?

A: 

1) Check that you've connected buttons' touch events (with Interface Builder or programmatically - something like Touch Up or Touch Down).

2) Check that all your parent views (for buttons) can get user touches (User Interactions Enabled == YES to all parent views) - if some parent view can't receive touches, responder chain for it's subviews won't be checked.

kpower