1
有没有办法来检测我的应用程序运行在设备上是否支持UIMotionEffect
?如何检测UIMotionEffect是否受支持?
有没有办法来检测我的应用程序运行在设备上是否支持UIMotionEffect
?如何检测UIMotionEffect是否受支持?
你可以这样测试:
if ([UIMotionEffect class]) {
// do stuff with UIMotionEffect
} else {
// UIMotionEffect does not exists
}
在iOS系统中< 4.2做这样的:
Class theClass = NSClassFromString(@"UIMotionEffect");
if (theClass) {
// do stuff with UIMotionEffect
} else {
// UIMotionEffect does not exists
}