【问题标题】:Can apple reject force change orientation?苹果可以拒绝强制改变方向吗?
【发布时间】:2014-04-27 05:23:00
【问题描述】:

为了强制改变设备方向,我从here获取代码

但是苹果可以拒绝使用 setOrientation: 的应用程序吗? 有一些经验吗?

或者可能有人有 100% 的工作并且不能被 Apple 拒绝,解决方案?

if (UIDeviceOrientationIsLandscape([[UIDevice currentDevice] orientation])) {
        if ([[UIDevice currentDevice] respondsToSelector:@selector(setOrientation:)]) {
            int orientationPortrait = UIInterfaceOrientationPortrait;
            NSMethodSignature *sig = [[UIDevice currentDevice] methodSignatureForSelector:@selector(setOrientation:)];
            NSInvocation* invo = [NSInvocation invocationWithMethodSignature:sig];
            [invo setTarget:[UIDevice currentDevice]];
            [invo setSelector:@selector(setOrientation:)];
            [invo setArgument:&orientationPortrait atIndex:2];
            [invo invoke];
        }
    }

好的,谢谢,我会试试这个sn-p。

【问题讨论】:

标签: ios iphone uideviceorientation


【解决方案1】:

不,Apple 会以强制导向为由拒绝。有时这是在横向/纵向中查看的要求和唯一方法。 Apple 不会拒绝

【讨论】:

  • 你试过吗? stackoverflow.com/a/7280833/986169。有点旧,但我认为它仍然相关
  • 是的,我的 aap 在商店中,在单一模式下有很多视图。您可以尝试从应用商店发送 meu 消息。如果接受答案也可以投票
  • 您知道并非每一位都经过测试,Apple 可能会跳过那一项。我的意思是,如果没有经过验证的 Apple 规则引用,这是一个很大的风险
  • 拒绝是基于重复的设计或类似的东西,或者如果您拥有 Apple 的私有代码/库。
  • 拒绝可能有多种原因,我坚持认为唯一的参考是苹果。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2011-11-25
  • 1970-01-01
  • 2019-06-12
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多