Game center login lock in landscape only in i OS 6

前端 未结 2 1988
北海茫月
北海茫月 2020-12-08 15:48

When Game center is loaded its default orientation is portrait. In order to lock it in landscape mode, added a category.

@implementation GKMatchmakerViewCo         


        
2条回答
  •  一向
    一向 (楼主)
    2020-12-08 16:22

    Have to add 1 little thing. Struggling with that stupid issue about 2 days. If above doesn't help and you have UINavigationController invovled (and you already did subclass it) you need the following (in appDelegate):

    [window setRootViewController:navigationController]; // use this
    // instead of [self.window addSubview:navigationController.view];
    

    thanx 2 http://grembe.wordpress.com/2012/09/19/here-is-what-i/

提交回复
热议问题