views:

121

answers:

2

Hello, i have a little problem on my view.

I have a uiviewControler, load a xib. on this view i have a UIButton ( on touch it's work fine)

I add a subview create by code (on a different class ) this view respond to her touch event.

when i add this subview on my view, the event on this view are ok, but the UIButton on my first uiview not work.

I have make an error ?

EDIT :

i have make some tests. my uiview is not really load alone. in fact i load a new uiviewController, and add it's subview to my current uiviewController.

And my problem it's due to the transparence of my new uiviewController was intercep my touch event.

A: 

If the subview's area overlaps the button it will prevent it from working. If the subview is displayed modally it will prevent the button from working. Otherwise, the button should work fine.

Your problem is most likely somewhere else.

TechZen
A: 

I have change my structure code, mow my view is only manage by his class ( herited from uiview ) and i have no uiViewController just for manage this. On the apple documentation they say the uiview controller is for manage multiple uiview on windows, and in my old code not respect this.

Pixman