I’m using UIGestureRecognizer for the first time and I want my app to run on iOS 3.0 onwards.
Since Apple clearly states that the library is available in iOS 3.2 and later I used the following code:
// Make sure that Gesture recognition technology is supportted by the device SDK version
if ([UIGestureRecognizer instancesRespondToSelector:@selector(initWithTarget:action:)])
{
[self initGestureRecognizers];
}
Surprisingly, when I run the App on the only target I have, that run SDK3.0, it works fine.
I replaced the condition to the following:
if ([[[UIDevice currentDevice] systemVersion] compare:@"3.2"] != NSOrderedAscending)
{
[self initGestureRecognizers];
}
I would love to get comments about it.
Thanks
That’s probably because UIGestureRecognizer was considered private before 3.2. Don’t be surprised if some things are buggy or don’t quite work as expected if you use UIGestureRecognizer under 3.0.