Is there a way to detect if the UIMotionEffect
is supported on the device my app is running on?
You can test it like this :
if ([UIMotionEffect class]) {
// do stuff with UIMotionEffect
} else {
// UIMotionEffect does not exists
}
In iOS < 4.2 do it like this :
Class theClass = NSClassFromString(@"UIMotionEffect");
if (theClass) {
// do stuff with UIMotionEffect
} else {
// UIMotionEffect does not exists
}