开发者

UINavigationController is the wrong size in cocos2d

开发者 https://www.devze.com 2023-02-24 05:03 出处:网络
I\'m able to add a view from UIView control to cocos2d.I then resize it using the frame property and it fills up the screen.Otherwise it looks like it is in portrait view and I can see the cocos2d vie

I'm able to add a view from UIView control to cocos2d. I then resize it using the frame property and it fills up the screen. Otherwise it looks like it is in portrait view and I can see the cocos2d view behind it and the bottom part is cut off.

So great... everything worked... but then.

I create a UINavigationController. I try the same thing all over with the uinavigationcontroller.view.frame, but no matter what happens it is stuck in the portrait mode.

How can i resize the view and the UINavig开发者_运维知识库ationController stuff so it fills the screen in landscape?


please handle view.frame property like following:

        CGRect hrect = viewController.view.frame;
        hrect.size.height = 1500;
        viewController.view.frame = hrect;
0

精彩评论

暂无评论...
验证码 换一张
取 消