2
votes

I got application that is using SplitViewController and popover, standard stuff. It worked fine for 10 releases starting with sdk 3.0. It still compiles and works fine in simulator on Snow Leopard, Xcode 4.2 and sdk 5.0. However, when running on Lion, Xcode 4.3 and sdk 5.1 it throws error:

Assertion failure in -[_UISlidingPopoverLayoutInfo _popoverViewSizeForContentSize:arrowDirection:], /SourceCache/UIKit_Sim/UIKit-1914.84/_UIPopoverLayoutInfo.m:160

* Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Unknown direction passed to _popoverViewSizeForContentSize:arrowDirection:'

popover is only initiate as part of the class:

@interface NewsDetailViewController : UIViewController <UIActionSheetDelegate, UISplitViewControllerDelegate, UIWebViewDelegate>{

    RssFunAppDelegate * _appDelegate;
    UITextView * _titleTextView;
    UINavigationBar * _navigationBar;
    UIPopoverController * _popContr;    
    UIWebView * _webView;
    UIActivityIndicatorView * _activityIndicator;
}
1
The header code you fronded has nothing to do with the error, so that piece of code is irrelevant. Post the code in your @implementation where you call the popover.WrightsCS
Yes, you will need to post the code where you create and use the popover.Jeff Wolski

1 Answers

0
votes

You need to post the code that initializes the UIPopoverController to get any real help.

From reading the exception text though, I would start by investigating the initializer to see if you set it to anything strange. The only supported values are:

UIPopoverArrowDirectionUp
UIPopoverArrowDirectionDown
UIPopoverArrowDirectionLeft
UIPopoverArrowDirectionRight
UIPopoverArrowDirectionAny

or the bitwise combination of these, e.g.

UIPopoverArrowDirectionLeft | UIPopoverArrowDirectionRight