Ios7 如何检测是否支持UIMotionEffect?

Ios7 如何检测是否支持UIMotionEffect?,ios7,ios8,iphone-4,Ios7,Ios8,Iphone 4,是否有方法检测运行我的应用程序的设备是否支持UIMotionEffect if ([UIMotionEffect class]) { // do stuff with UIMotionEffect } else { // UIMotionEffect does not exists } Class theClass = NSClassFromString(@"UIMotionEffect"); if (theClass) { // do stuff with UIMot

是否有方法检测运行我的应用程序的设备是否支持
UIMotionEffect

if ([UIMotionEffect class]) {
    // do stuff with UIMotionEffect
} else {
    // UIMotionEffect does not exists
}
Class theClass = NSClassFromString(@"UIMotionEffect");
if (theClass) {
    // do stuff with UIMotionEffect
} else {
    // UIMotionEffect does not exists
} 
在iOS<4.2中,按如下方式操作:

if ([UIMotionEffect class]) {
    // do stuff with UIMotionEffect
} else {
    // UIMotionEffect does not exists
}
Class theClass = NSClassFromString(@"UIMotionEffect");
if (theClass) {
    // do stuff with UIMotionEffect
} else {
    // UIMotionEffect does not exists
}