I am writing a universal application that will work on both the iPad and iPhone. I also need it to target older devices (those that can't run 4.0), so 3.1 is mandatory.
I have already installed the base SDK in the latest available version (4.2), and Target for deployment is 3.1. I do a lot of runtime checks to call the appropriate methods only on the device / version I need.
One of the things I use on the iPad is the UISplitViewController. When assigning a delegate to splitViewController, the compiler generates a warning because the class interface does not explicitly use the UISplitViewControllerDelegate protocol, and I'm afraid that if I declare it to do so, the application will crash on older devices where there is no UISplitViewController / UISplitViewControllerDelegate.
What is the best way to suppress a compiler warning? Should I declare an empty UISplitViewControllerDelegate? If so, can I do this conditionally at runtime? Or should I just bring the appropriate class interface to the protocol and not worry about older devices?
Best