UIPopoverController and UISplitView in iOS 5.1 -> unknown function: _presentPopoverBySlidingIn: - ios5

I canĀ“t find nothing about:
UIPopoverController _presentPopoverBySlidingIn:fromEdge:ofView:animated:stateOnly:notifyDelegate:
I got following error message:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIPopoverController _presentPopoverBySlidingIn:fromEdge:ofView:animated:stateOnly:notifyDelegate:]: Popovers cannot be presented from a view which does not have a window.'
I start my iPad-App in Portrait-Mode. And because I need some steps to be done from the master-VC, I present the Popover-Controller programmatically via
[ _masterPopoverController presentPopoverFromBarButtonItem:self.navigationItem.leftBarButtonItem permittedArrowDirections:UIPopoverArrowDirectionAny animated:NO];
When I want to dismiss the Popover manually (via touch or swipe outside the popover), the above error occurs.
The problem exists since iOS 5.1.

Related

dismissModalViewControllerAnimated not working on XIB

I have an XIB that I present as a modal view. I have a button that calls the following -
(IBAction)dismissVC:(id)sender {
[self.parentViewController dismissModalViewControllerAnimated: YES];
}
When I press it the app crashes with this notice -
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[ViewController dismissVC:]: unrecognized selector sent to instance 0x8379350'
The thing I noticed is that I have a ViewController.xib file and I have this MapView.xib that is a modal VC I want to dismiss. It's presented from a ViewController.xib
What could be the possible issue? I've hooked up all the actions and the File Onwer thing as well.
Thanks in advance!
Try this:
unrecognized selector sent to instance
that might be your solution.

IPhone app use core-plot (What to fix)?

i'm making iphone app that use Core-Plot chart. The app have "SavolaViewController as a main class that include a button and when button clicked it's GoTo to another class named "ChartViewController" by this code
ChartViewControllerVar = [[ChartViewController alloc]initWithNibName:#"ChartViewController" bundle:nil];
[self presentModalViewController:ChartViewControllerVar animated:YES];
I have read about core-plot for 4-6 hours and i have not understand any of the tutorials(it's not understandable) [({"Please dont answer with tutorial link"})]
I have coped the Core-Plot code from the example in Core-Plot .zip file(you'll find the code in the link bellow).
and i have this msg in the console
2012-07-15 16:38:31.325 Savola[13105:f803] * Terminating app due to
uncaught exception 'NSInternalInconsistencyException', reason:
'-[UIViewController _loadViewFromNibNamed:bundle:] loaded the
"ChartViewController" nib but the view outlet was not set.'
* First throw call stack: (0x140a022 0x19c2cd6 0x13b2a48 0x13b29b9 0x4102dd 0x410779 0x41099b 0x4199bc 0x414818 0x630565 0x417857
0x4179bc 0xca94792 0x4179fc 0x9a4f 0x3da5c5 0x3da7fa 0xc6f85d
0x13de936 0x13de3d7 0x1341790 0x1340d84 0x1340c9b 0x228f7d8 0x228f88a
0x349626 0x8c0a 0x2c55) terminate called throwing an exception(lldb)
What i want(If you can)
Fix the code to run in my app.
What does i need to but in the .xib file.
delete the codes unneeded.
The code
This has nothing to do with Core Plot. You have an IBOutlet in your .xib that's not connected properly.

Gesture recognizer in Interface builder crashes my app

I'm trying to make a gesture recognizer in my app with Interface Builder.
I drag and drop my gesture on my view (it is a UIView which contains UILabel, UIImage and UITextView, all made in Interface Builder).
But when I compile and run, my app crashes and I get the following error:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString setView:]: unrecognized selector sent to instance 0x80a5fd0'
I don't understand the reason.
Can someone help me?

TabbarController crashes in 3.0

i am using TabBarController , it is working fine in my ipod.
but my application is crashing it 3.0 . any help please?
self.window.rootViewController = self.tabBarController; //crashing here
and log shows
-[UIWindow setRootViewController:]: unrecognized selector sent to instance 0x127c80
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -
[UIWindow setRootViewController:]: unrecognized selector sent to instance 0x127c80'
This may show you the right direction. Let me know if the problem still continues.
Due to executing on different versions of iOS, that method may have deprecated.
The crash is because you're calling a method that doesn't exist, not because your variables are not initialized.
-setRootViewController doesn't exist prior to iOS 4.0. Use
[self.window addSubview:self.tabBarController.view];
instead.
Or, update your target platfor to 4.0.2 or later. It's probably less than 5% of users that aren't using iOS 4 at this point.

UISplitViewController with NavigationControllers (including sample code)

The easiest way to see this problem will be to run the sample project here:
http://drop.io/stackproblem
Basically, It's a uisplitviewcontroller which can be switched between 2 detail views, both of which are navigation controllers.
The problem is that it crashes with the following error:
MultipleDetailViews[8531:207] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Popovers cannot be presented from a view which does not have a window.'
It crashes with this error if you use the app in PORTRAIT and you navigate (still in portrait) from the first controller, to the second, to the first, to the second, and then boom CRASH using the popover controller.
One way to stop the crash is to stop lazy loading the navigation controllers and to load them fresh everytime but this isn't an option for the app I'm making.
Any ideas and I may fall in love.
Try using if (self.view.window != nil) just before the line that's causing the crash.