Working with iPhone OS 3.2 only classes

Posted by user324881 on Stack Overflow See other posts from Stack Overflow or by user324881
Published on 2010-05-05T15:17:33Z Indexed on 2010/05/05 15:28 UTC
Read the original article Hit count: 278

Filed under:
|
|
|

How would you write a universal app that uses classes introduced in iPhone OS 3.2, such as UIPopoverController and UISplitViewController? On Jeff LaMarche's blog about this, Ole provides a method for instantiating these objects; you would instantiate a UIPopoverController like so: [NSClassFromString(@"UIPopoverController") alloc].

This is fine for instantiating these classes in code but what about protocols and their methods? My iPad app uses a UISplitViewController and has a class that needs to conform to the UISplitViewControllerDelegate and UIPopoverControllerDelegate. How would you declare this? And how would you work with a method such as the following?

- (void)splitViewController:(UISplitViewController *)svc willHideViewController:(UIViewController *)aViewController withBarButtonItem:(UIBarButtonItem *)barButtonItem forPopoverController:(UIPopoverController *)pc

where the method call requires UISplitViewController to be passed in?

© Stack Overflow or respective owner

Related posts about ipad

Related posts about iphone