Method [UIDevice setOrientation:] - is it still denied?

前端 未结 5 829
鱼传尺愫
鱼传尺愫 2020-12-21 08:04

I\'ve heard that using of [UIDevice setOrientation:] can be the reason to app rejection in Appstore. Is there any proofed info about it?

5条回答
  •  情歌与酒
    2020-12-21 08:41

    The method is there to give you information about the physical orientation of the device, no amount of coding will change that physical orientation. It is set depending on the gyros/accelerometers it would make no sense for you to tell the device what its orientation is.

    If you want to change the interface orientation then you should look into the UIViewController callbacks which allow you to define that:

      interfaceOrientation  property
    – shouldAutorotateToInterfaceOrientation:
    + attemptRotationToDeviceOrientation
    – rotatingHeaderView
    – rotatingFooterView
    – willRotateToInterfaceOrientation:duration:
    – willAnimateRotationToInterfaceOrientation:duration:
    – didRotateFromInterfaceOrientation:
    

提交回复
热议问题