How can ofEvents and Gui work together?

ofEvents (touch events) and Gui don’t work together (when we use GUI touch events become inactive)

we run iPhoneGuiExample and wait that application should respond to touch events, but nothing happens.

Added in ::setup()

ofRegisterTouchEvents(this);

In other examples (without using GUI) it works

All you need to do is add the GUI to ofxiPhoneGetGLView() instead of ofxiPhoneGetUIWindow()

In the bundled example, change this line in setup():
[ofxiPhoneGetUIWindow() addSubview:myGuiViewController.view];

to this:
[ofxiPhoneGetGLView() addSubview:myGuiViewController.view];