简体   繁体   中英

Preparing a Universal App for iPhone SDK 3.2

I am working on a universal app, I used UISplitViewController in doing iPad application. I followed the Universal app guidelines ie, i keep base SDK as 3.2, iPhone Target OS ad iPhone OS 3.1.3, Taget device as iPhone/iPad. And i used "Adding Runtime Checks for Newer Symbols" for UISplitViewController and UIPopOverController.

Class splitVCClass = NSClassFromString(@"UISplitViewController");

if (splitVC)

{

   UISplitViewController* mySplitViewController = [[splitVCClass alloc] init];

   // Configure the split view controller.

}

I used this in .m files I declared UIPopOverController in .h files also

"dyld: Symbol not found: _OBJC_CLASS_$_UIPopoverController Referenced from: /var/mobile/Applications/9E0CE75F-D2A9-4132-AE56-1780928BCF21/UniversalTasks.app/UniversalTasks Expected in: /System/Library/Frameworks/UIKit.framework/UIKit in /var/mobile/Applications/9E0CE75F-D2A9-4132-AE56-1780928BCF21/UniversalTasks.app/UniversalTasks"

What i have to do can any one help me out

I am not entirely sure, but maybe this can help:

Class classPopoverController = NSClassFromString(@"UIPopoverController");
if (classPopoverController)
{
  id popover = [[classPopoverController alloc] initWithContentViewController:imgPicker];

  [popover presentPopoverFromRect:CGRectMake(0, 0, popoverParent.frame.size.width, 80) 
    inView:popoverParent permittedArrowDirections:(1UL << 0) animated:YES];
}

Basically you need to replace "UIPopoverController *" with "id", because this symbol is not defined in earlier SDK.

The correct answer is here: Symbol not found: _OBJC_CLASS_$_UIPopoverController

First you must take the original poster's implicit instructions: move all your iPad-only code (popovers etc) into iPad subclasses etc. Then follow the final answer.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM