Should use [NSClassFromString(@"UIPopoverController") alloc] to instantiate #25

Open
MikeWeller opened this Issue Oct 22, 2010 · 1 comment

Projects

None yet

2 participants

When compiling a universal binary for iPhone and iPad a run-time link error occurs when running the app on the phone.

In MGSplitViewController.m the line:

    _hiddenPopoverController = [[UIPopoverController alloc] initWithContentViewController:self.masterViewController];

Should be:

    _hiddenPopoverController = [[NSClassFromString(@"UIPopoverController") alloc] initWithContentViewController:self.masterViewController];

To allow running on phones.

newacct commented Mar 12, 2011

Or, you can just wrap it inside a
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
and it will be fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment