如何检查是否启用了视差 [英] How to Check if Parallax is enabled

查看:298
本文介绍了如何检查是否启用了视差的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在制作一个壁纸应用,并想检查用户是否在他的iOS 7设备上启用了视差。在Objective-C中有一种方法可以检查吗? Apple是否允许开发人员访问以检查此布尔值?

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 granted us developers access to check this boolean?

即。如果启用了视差,请执行step1否则执行step2

i.e. if parallax is enabled do step1 otherwise do step2

推荐答案

从iOS 8开始:

// Returns whether the system preference for reduce motion is enabled
UIKIT_EXTERN BOOL UIAccessibilityIsReduceMotionEnabled() NS_AVAILABLE_IOS(8_0);
UIKIT_EXTERN NSString *const UIAccessibilityReduceMotionStatusDidChangeNotification NS_AVAILABLE_IOS(8_0);

对于早于iOS 8的任何内容,我认为没有一种合法的方式可以说明。

For anything earlier than iOS 8, I don't think there's a legit way to tell.

这篇关于如何检查是否启用了视差的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆