Hacker News new | ask | show | jobs
by jbrennan 4287 days ago
Great article although I think it’s worth mentioning the pattern of checking the iOS system version for method availability (e.g., `if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0)`) should be avoided.

I think it’s a better practice to query the object in question if it responds to the desired selector. This way, if the method ever goes away (in say iOS 10), you won’t send the wrong message to the object/class.