How to Check if Parallax is enabled

前端 未结 3 1973
再見小時候
再見小時候 2020-12-17 00:55

I am making a wallpaper app and would like to check if a user has parallax enabled on his iOS 7 device. Is there a way in objective-C that I can check that? Has Apple grante

3条回答
  •  佛祖请我去吃肉
    2020-12-17 01:46

    For devices not supporting the parallax (i.e. any iPhone model before iPhone 5) you can just check the model and be sure that no parallax is on.

    For the device supporting it you should programmatically check the Reduce Motion accessibility setting, but apparently there's no public API for checking whether that option is on.

    According to the UIKit Function Reference, the only checks you can perform are the following

    • UIAccessibilityPostNotification
    • UIAccessibilityIsVoiceOverRunning
    • UIAccessibilityIsClosedCaptioningEnabled
    • UIAccessibilityRequestGuidedAccessSession
    • UIAccessibilityIsGuidedAccessEnabled
    • UIAccessibilityIsInvertColorsEnabled
    • UIAccessibilityIsMonoAudioEnabled
    • UIAccessibilityZoomFocusChanged
    • UIAccessibilityRegisterGestureConflictWithZoom
    • UIAccessibilityConvertFrameToScreenCoordinates
    • UIAccessibilityConvertPathToScreenCoordinates

提交回复
热议问题