Hello,
I have been fighting/struggling to get cocos2d's GLView to coexist with a UIViewController and not get really weird orientation issues. In the end my solution to this was to disable the code internally in cocos2d that rotated the view. I have added this as an option in my fork of cocos2d. You can read about it on our company blog: http://ohminteractive.se/2010/07/15/cocos2d-and-orientation-madness/ and if you have any comments on the code or the method of doing it please tell us here or in the comment section of the blog. Hope this helps anyone in the same situation.
-- Tobias