【问题标题】:Ipad ModalView rotation problemIpad ModalView 旋转问题
【发布时间】:2011-01-26 07:46:10
【问题描述】:

我创建了一个UISplitView,在以横向模式加载splitView后,我使用presentModalView显示一个modalView,我的问题是modalView总是处于纵向模式,找不到解决方案。

UIDeviceOrientation orientation = [[UIDevice currentDevice] orientation];

它给了我横向但使用

UIDeviceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation]

给了我肖像。 (不适用于 4.2)

谢谢,

【问题讨论】:

    标签: objective-c ipad presentmodalviewcontroller device-orientation


    【解决方案1】:

    我正在使用一个 NSTimer 并使用它和它的工作来失去我的功能,这有点棘手,但这是我现在找到的唯一解决方案。

    [NSTimer scheduledTimerWithTimeInterval:0.1 target:self selector:@selector(loadingModal:) userInfo:nil repeats:NO];
    

    【讨论】:

      猜你喜欢
      • 2011-07-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多