I’m new to programming and had a question. As newer API comes out, like things in iOS 5 for example, do you need to have two ways of doing something (pre ios5 and ios5)? Like
if ([respondsToSelector: (some ios 5 method)]) {
// use iOS 5 methods
}
else {
// use pre ios 5 methods
}
Sorry if this is a noob question, it’s just not something that was really covered in the classes I’ve taken so far. Thanks.
Yes this is a perfectly acceptable method to check for available APIs.