Comment

Comment by jbrennan

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.

parent jbrennan 12 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton