Check your nib for a rogue IBOutlet. It sometimes happens when you defined a view (in Interface Builder) as one class, then later change it to another class, but don't clean up the old connections. (I had originally stated it was simply from deleting the outlet in your .
H, but realized that was the wrong scenario, and recalled the correct one).
Up vote 0 down vote favorite share g+ share fb share tw.
Hi I'm trying to make a popover happen on the click of a button, something I've done successfully before, but for some reason I can't make it happen. I'm using iOS 5 now. So far I have -(void)changetablebuttonPressed:(id)sender{ UIButton *button = (UIButton*)sender; changetableView = ChangeTableViewController alloc initWithNibName:@"ChangeTableViewController" bundle:nil; changetablePopover = UIPopoverController alloc initWithContentViewController:changetableView; changetablePopover presentPopoverFromRect:button.
Frame inView:self. View permittedArrowDirections:UIPopoverArrowDirectionAny animated:TRUE; } The code causes a SIGABRT error after trying to initWithContentViewController or even a straightforward init. I've checked that changetableView is not null and so I'm stumped!
The only custom code in the ChangeTableViewController is in viewDidLoad and is self. ContentSizeForViewInPopover = CGSizeMake(320, 144); Any guesses would be appreciated. EDIT: The exception isn't being printed to the console (I don't think), here is the entire output, with Zombies enabled: GNU gdb 6.3.50-20050815 (Apple version gdb-1708) (Mon Aug 15 16:03:10 UTC 2011) Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB.
Type "show warranty" for details. This GDB was configured as "x86_64-apple-darwin". Sharedlibrary apply-load-rules all Attaching to process 7596.
Catchpoint 2 (throw)Pending breakpoint 1 - "objc_exception_throw" resolved Catchpoint 2 (exception thrown).(gdb) bt #0 0x03dc9a4f in __cxa_throw () #1 0x01745e15 in objc_exception_throw () #2 0x0155ca78 in +NSException raise:format:arguments: () #3 0x0155c9e9 in +NSException raise:format: () #4 0x001c7f0d in -UIViewController _loadViewFromNibNamed:bundle: () #5 0x001c83a9 in -UIViewController loadView () #6 0x001c85cb in -UIViewController view () #7 0x00596559 in -UIPopoverController _transitionFromViewController:toViewController:animated: () #8 0x00593b13 in -UIPopoverController initWithContentViewController: () #9 0x0000b7f7 in -DetailViewController changetablebuttonPressed: (self=0x6a510e0, _cmd=0x18af6, sender=0x6a696f0) at .../DetailViewController. M:385 #10 0x015b5ec9 in -NSObject performSelector:withObject:withObject: () #11 0x001055c2 in -UIApplication sendAction:to:from:forEvent: () #12 0x0010555a in -UIApplication sendAction:toTarget:fromSender:forEvent: () #13 0x001aab76 in -UIControl sendAction:to:forEvent: () #14 0x001ab03f in -UIControl(Internal) _sendActionsForEvents:withEvent: () #15 0x001aa2fe in -UIControl touchesEnded:withEvent: () #16 0x003c3a2a in _UIGestureRecognizerUpdate () #17 0x015889ce in __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ () #18 0x0151f670 in __CFRunLoopDoObservers () #19 0x014eb4f6 in __CFRunLoopRun () #20 0x014eadb4 in CFRunLoopRunSpecific () #21 0x014eaccb in CFRunLoopRunInMode () #22 0x0149d879 in GSEventRunModal () #23 0x0149d93e in GSEventRun () #24 0x00102a9b in UIApplicationMain () #25 0x00002b42 in main (argc=1, argv=0xbfffed78) at .../main. M:16 #26 0x00002ab5 in start () Current language: auto; currently objective-c (gdb) ios uiviewcontroller initialization uipopovercontroller link|improve this question edited Dec 7 '11 at 22:58 asked Dec 7 '11 at 17:57Josh38512 91% accept rate.
1 "Any guesses would be appreciated" Without looking at your crash logs it would definitely be guesses. Update your question with crash log. SIGABRT is not enough debug information.
– 0x8badf00d Dec 7 '11 at 18:22 As ridiculous as this sounds, I've only just upgraded to xcode 4 and I don't know where to find the crash information. It used to dumped it all to the console but there's nothing there now. – Josh Dec 7 '11 at 18:27 The stack trace is a good start.
The raised exception should be printing to the console. What is it? – Mark Adams Dec 7 '11 at 22:23 Enable zombie objects and post the crash log again.
– Chris Wagner Dec 7 '11 at 22:25 Just to make sure, as dimensions of popover contentsize look fishy, you are building an iPad app right? Because, UIPopoverController is not supporter for the iPhone. – tiltem Dec 7 '11 at 23:07.
Check your nib for a rogue IBOutlet. It sometimes happens when you defined a view (in Interface Builder) as one class, then later change it to another class, but don't clean up the old connections. (I had originally stated it was simply from deleting the outlet in your .
H, but realized that was the wrong scenario, and recalled the correct one). You are looking for an outlet with the yellow triangle to the right, like: It is happening during the loading of the view, which is when the nib loader is trying to pair up objects with their outlets.
Well it turns out I hadn't connected a navigation controller's delegate in interface builder. There wasn't a warning or error, just a crash. One of those where I'd been staring at it for too long!
– Josh Dec 11 '11 at 6:53.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.