Hi,
I am using the ImageTargets sample as a base for my app. I have already added some labels as hints for the user. I would like to add 2 uibuttons to the ImageTargetsOverlayViewController and I had no problems with that. I have also added a target action when the buttons are pressed. Problem is, touches are not processed by this controller. I am aware that the touchesBegan methods are implemented in ARParentViewController and overriden in OverlayViewController to pass through to the parent, so I have commented them out. But I still do not receive touches in the ImageTargetsOverlayViewController. Why is that?
And isn't the ImageTargetsOverlayViewController the place to add UI elements to interact with? Why should one handle touches in its parent controller?
I am using the native iOS sdk, MacOS 10.7.5, xcode 4.3.3, ipod 4th gen, iOS 5.1.
Thanks,
Mike
UIButton in OverlayViewController
I'd be interested in a reply to this as well. I need to put buttons, etc in the overlayView but figuring out how to properly handle user interactions in this case seems a little wonky.
UIButton in OverlayViewController
In the OverlayViewController file have a look at the ViewDidLoad function:
- (void) loadView
{
UIButton in OverlayViewController
It certainly feels embarassing to have missed that... Thank you very much for pointing it out to me.
Best regards,
Mike
UIButton in OverlayViewController
No problem.
Glad I could help :)
N