基于mac平台上用cocos2dx开发屏幕竖屏设置 x-code5

来源:互联网 发布:网络传输介质 编辑:程序博客网 时间:2024/05/23 13:31


第一步

左侧项目栏里面找到RootViewController.mm


/ Override to allow orientations other than the default portrait orientation.// This method is deprecated on ios6- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {        return UIInterfaceOrientationIsPortrait( interfaceOrientation );  //竖直   // return UIInterfaceOrientationIsLandscape( interfaceOrientation );}// For ios6, use supportedInterfaceOrientations & shouldAutorotate instead- (NSUInteger) supportedInterfaceOrientations{#ifdef __IPHONE_6_0    //return UIInterfaceOrientationMaskAllButUpsideDown;    return UIInterfaceOrientationMaskPortrait;#endif}
找到上面这段就好了




第二步


点击项目 名称就是项目烂第一个然后找到  deployment info  这个栏目 把    Device Orientation里面得 Portrait 打上勾  ok了







0 0
原创粉丝点击