NSInvalidArgumentException', reason: 'Receiver (<ViewController:>) has no segue with identifier ''' - ios

> 2014-09-20 18:04:45.564 storyboard_demo[6919:60b] nested push
animation can result in corrupted navigation bar 2014-09-20
18:04:45.921 storyboard_demo[6919:60b] Finishing up a navigation
transition in an unexpected state. Navigation Bar subview tree might
get corrupted. 2014-09-20 18:04:46.442 storyboard_demo[6919:60b] *
Terminating app due to uncaught exception
'NSInvalidArgumentException', reason: 'Receiver
() has no segue with identifier
'third''
* First throw call stack: ( 0 CoreFoundation 0x017ed1e4 exceptionPreprocess + 180 1 libobjc.A.dylib
0x0156c8e5 objc_exception_throw + 44 2 UIKit
0x0034d48c -[UIViewController
shouldPerformSegueWithIdentifier:sender:] + 0 3 storyboard_demo
0x0000254e -[secondViewController btn_second:] + 110 4
libobjc.A.dylib 0x0157e880 -[NSObject
performSelector:withObject:withObject:] + 77 5 UIKit
0x0022e3b9 -[UIApplication sendAction:to:from:forEvent:] + 108 6
UIKit 0x0022e345 -[UIApplication
sendAction:toTarget:fromSender:forEvent:] + 61 7 UIKit
0x0032fbd1 -[UIControl sendAction:to:forEvent:] + 66 8 UIKit
0x0032ffc6 -[UIControl _sendActionsForEvents:withEvent:] + 577 9
UIKit 0x0032f243 -[UIControl
touchesEnded:withEvent:] + 641 10 UIKit
0x0026dddd -[UIWindow _sendTouchesForEvent:] + 852 11 UIKit
0x0026e9d1 -[UIWindow sendEvent:] + 1117 12 UIKit
0x002405f2 -[UIApplication sendEvent:] + 242 13 UIKit
0x0022a353 _UIApplicationHandleEventQueue + 11455 14 CoreFoundation
0x0177677f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION
+ 15 15 CoreFoundation 0x0177610b __CFRunLoopDoSources0 + 235 16 CoreFoundation 0x017931ae __CFRunLoopRun + 910 17 CoreFoundation
0x017929d3 CFRunLoopRunSpecific + 467 18 CoreFoundation
0x017927eb CFRunLoopRunInMode + 123 19 GraphicsServices
0x037e15ee GSEventRunModal + 192 20 GraphicsServices
0x037e142b GSEventRun + 104 21 UIKit
0x0022cf9b UIApplicationMain + 1225 22 storyboard_demo
0x00002e4d main + 141 23 libdyld.dylib
0x01e3470d start + 1 24 ???
0x00000001 0x0 + 1 ) libc++abi.dylib: terminating with uncaught
exception of type NSException
(lldb)

Do it in two steps.
btn_second: can post a notification that it has been pressed and then return to 'first'. 'first' receives the notification and sets a flag. In viewWillAppear, 'first' checks the flag and does a 'third' segue if it's set.

Related

ibc++abi.dylib: terminating with uncaught exception of type NSException (lldb)

when i run my app, i received this error :
2014-11-10 06:14:05.581 Yoga[4032:110484] user is registered
2014-11-10 06:14:30.552 Yoga[4032:110484] * Terminating app due to uncaught exception 'NSGenericException', reason: 'Push segues can only be used when the source controller is managed by an instance of UINavigationController.'
* First throw call stack:
(
0 CoreFoundation 0x000000010c999f35 exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010c632bb7 objc_exception_throw + 45
2 UIKit 0x000000010b43e16a -[UIStoryboardPushSegue destinationContainmentContext] + 0
3 UIKit 0x000000010aedc8be -[UIApplication sendAction:to:from:forEvent:] + 75
4 UIKit 0x000000010afe3410 -[UIControl _sendActionsForEvents:withEvent:] + 467
5 UIKit 0x000000010afe27df -[UIControl touchesEnded:withEvent:] + 522
6 UIKit 0x000000010af22308 -[UIWindow _sendTouchesForEvent:] + 735
7 UIKit 0x000000010af22c33 -[UIWindow sendEvent:] + 683
8 UIKit 0x000000010aeef9b1 -[UIApplication sendEvent:] + 246
9 UIKit 0x000000010aefca7d _UIApplicationHandleEventFromQueueEvent + 17370
10 UIKit 0x000000010aed8103 _UIApplicationHandleEventQueue + 1961
11 CoreFoundation 0x000000010c8cf551 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17
12 CoreFoundation 0x000000010c8c541d __CFRunLoopDoSources0 + 269
13 CoreFoundation 0x000000010c8c4a54 __CFRunLoopRun + 868
14 CoreFoundation 0x000000010c8c4486 CFRunLoopRunSpecific + 470
15 GraphicsServices 0x000000010d3329f0 GSEventRunModal + 161
16 UIKit 0x000000010aedb420 UIApplicationMain + 1282
17 Yoga 0x000000010a840b53 main + 115
18 libdyld.dylib 0x000000010f69b145 start + 1
19 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
somebody can help me pls
add Navigation Controller to your initial view
Select the initial view
Go To Editor--> Embed In --> Navigation Controller.

Tableview / ScrollView within the UIPageController cause crash while navigating to next Page

I have a UIPageViewController which holds two screens.
self.pageController = [[UIPageViewController alloc] initWithTransitionStyle:UIPageViewControllerTransitionStyleScroll navigationOrientation:UIPageViewControllerNavigationOrientationHorizontal options:nil];
And one of the screen contains tableview on iphone /Collection view on ipad.On some user event we are setting the contentOfset to move the tableview a bit up
[table setContentOffset:cell.frame.origin animated:YES];
Then user navigates to next screen using UIPageviewcontroller
Above usecase causes crash on the app with the following logs
2014-11-14 09:04:46.783 tibbr[12329:79833] *** Assertion failure in -[_UIQueuingScrollView _setWrappedViewAtIndex:withView:], /SourceCache/UIKit_Sim/UIKit-3318.16.14/_UIQueuingScrollView.m:338
2014-11-14 09:04:46.786 tibbr[12329:79833] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Unexpected subviews'
*** First throw call stack:
(
0 CoreFoundation 0x0000000113512f35 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000111be7bb7 objc_exception_throw + 45
2 CoreFoundation 0x0000000113512d9a +[NSException raise:format:arguments:] + 106
3 Foundation 0x00000001115c15df -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 195
4 UIKit 0x00000001108715e0 -[_UIQueuingScrollView _setWrappedViewAtIndex:withView:] + 215
5 UIKit 0x0000000110871b0a -[_UIQueuingScrollView _replaceViews:updatingContents:adjustContentInsets:animated:] + 672
6 UIKit 0x0000000110873e57 -[_UIQueuingScrollView setView:direction:animated:completion:] + 524
7 UIKit 0x00000001107d5e16 -[UIPageViewController _setViewControllers:withScrollInDirection:animated:completion:] + 483
8 UIKit 0x00000001107d5f78 -[UIPageViewController setViewControllers:direction:animated:completion:] + 157
12 UIKit 0x000000011024e8be -[UIApplication sendAction:to:from:forEvent:] + 75
13 UIKit 0x0000000110355410 -[UIControl _sendActionsForEvents:withEvent:] + 467
14 UIKit 0x00000001103cf9ea -[UISegmentedControl _setSelectedSegmentIndex:notify:animate:] + 570
15 UIKit 0x00000001103d1a0f -[UISegmentedControl touchesEnded:withEvent:] + 143
16 UIKit 0x00000001105fb540 _UIGestureRecognizerUpdate + 9487
17 UIKit 0x0000000110293ff6 -[UIWindow _sendGesturesForEvent:] + 1041
18 UIKit 0x0000000110294c23 -[UIWindow sendEvent:] + 667
19 UIKit 0x00000001102619b1 -[UIApplication sendEvent:] + 246
20 UIKit 0x000000011026ea7d _UIApplicationHandleEventFromQueueEvent + 17370
21 UIKit 0x000000011024a103 _UIApplicationHandleEventQueue + 1961
22 CoreFoundation 0x0000000113448551 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
23 CoreFoundation 0x000000011343e41d __CFRunLoopDoSources0 + 269
24 CoreFoundation 0x000000011343da54 __CFRunLoopRun + 868
25 CoreFoundation 0x000000011343d486 CFRunLoopRunSpecific + 470
26 GraphicsServices 0x0000000113e859f0 GSEventRunModal + 161
27 UIKit 0x000000011024d420 UIApplicationMain + 1282
28 tibbr 0x000000010cb942d1 tibbr + 58065
29 libdyld.dylib 0x0000000112660145 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Kindly do suggest me what could be root cause of this issue

Present UIViewController from subclass of UIView

I have created a subclass of UIView, Now in my app i need to present a UIViewController from it,
I have tried following :
poiInfoController = [[poiInfoController alloc]initWithNibName:#"poiInfoController" bundle:nil];
[poiInfoController setModalPresentationStyle:UIModalPresentationFormSheet];
[[[[UIApplication sharedApplication] keyWindow] rootViewController] presentModalViewController:poiInfoController animated:YES];
but it will crash with Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Application tried to present modally an active controller .'
Please Help,
**EDIT CRASH LOG:**
2014-04-23 17:04:26.433 NavigationLibSprintMoM[4610:a0b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Application tried to present modally an active controller <ViewController: 0x9d52140>.'
*** First throw call stack:
(
0 CoreFoundation 0x017c15e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x014d08b6 objc_exception_throw + 44
2 UIKit 0x0036217a -[UIViewController presentViewController:withTransition:completion:] + 4879
3 UIKit 0x00362caf -[UIViewController presentViewController:animated:completion:] + 130
4 NavigationLibSprintMoM 0x00005f7b -[NavigationView handleGesture:] + 964
5 UIKit 0x005baf8c _UIGestureRecognizerSendActions + 230
6 UIKit 0x005b9c00 -[UIGestureRecognizer _updateGestureWithEvent:buttonEvent:] + 383
7 UIKit 0x005bb66d -[UIGestureRecognizer _delayedUpdateGesture] + 60
8 UIKit 0x005bebcd ___UIGestureRecognizerUpdate_block_invoke + 57
9 UIKit 0x005beb4e _UIGestureRecognizerRemoveObjectsFromArrayAndApplyBlocks + 317
10 UIKit 0x005b5248 _UIGestureRecognizerUpdate + 199
11 UIKit 0x00281d4a -[UIWindow _sendGesturesForEvent:] + 1291
12 UIKit 0x00282c6a -[UIWindow sendEvent:] + 1030
13 UIKit 0x00256a36 -[UIApplication sendEvent:] + 242
14 UIKit 0x00240d9f _UIApplicationHandleEventQueue + 11421
15 CoreFoundation 0x0174a8af __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
16 CoreFoundation 0x0174a23b __CFRunLoopDoSources0 + 235
17 CoreFoundation 0x0176730e __CFRunLoopRun + 910
18 CoreFoundation 0x01766b33 CFRunLoopRunSpecific + 467
19 CoreFoundation 0x0176694b CFRunLoopRunInMode + 123
20 GraphicsServices 0x038699d7 GSEventRunModal + 192
21 GraphicsServices 0x038697fe GSEventRun + 104
22 UIKit 0x0024394b UIApplicationMain + 1225
23 NavigationLibSprintMoM 0x0000374d main + 141
24 libdyld.dylib 0x01f54725 start + 0
25 ??? 0x00000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException

Unrecognized selector sent to instance, Storyboard bug after connecting a button to view controller

I was messing with my storyboard with no code involved and got this error after I connected "Terms of use" button to a view controller. It was working fine before this action.
-I created and connected a class to Terms of Use View Controller
-I used action push segue to connect
2014-01-22 17:26:45.434 Project[1162:a0b] -[AboutViewController termsOfUseButton:]: unrecognized selector sent to instance 0x8c89d40
2014-01-22 17:26:45.437 Project[1162:a0b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[AboutViewController termsOfUseButton:]: unrecognized selector sent to instance 0x8c89d40'
*** First throw call stack:
(
0 CoreFoundation 0x0173b5e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x014be8b6 objc_exception_throw + 44
2 CoreFoundation 0x017d8903 -[NSObject(NSObject) doesNotRecognizeSelector:] + 275
3 CoreFoundation 0x0172b90b ___forwarding___ + 1019
4 CoreFoundation 0x0172b4ee _CF_forwarding_prep_0 + 14
5 libobjc.A.dylib 0x014d0874 -[NSObject performSelector:withObject:withObject:] + 77
6 UIKit 0x0022e0c2 -[UIApplication sendAction:to:from:forEvent:] + 108
7 UIKit 0x0022e04e -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 61
8 UIKit 0x003260c1 -[UIControl sendAction:to:forEvent:] + 66
9 UIKit 0x00326484 -[UIControl _sendActionsForEvents:withEvent:] + 577
10 UIKit 0x00325733 -[UIControl touchesEnded:withEvent:] + 641
11 UIKit 0x0026b51d -[UIWindow _sendTouchesForEvent:] + 852
12 UIKit 0x0026c184 -[UIWindow sendEvent:] + 1232
13 UIKit 0x0023fe86 -[UIApplication sendEvent:] + 242
14 UIKit 0x0022a18f _UIApplicationHandleEventQueue + 11421
15 CoreFoundation 0x016c483f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
16 CoreFoundation 0x016c41cb __CFRunLoopDoSources0 + 235
17 CoreFoundation 0x016e129e __CFRunLoopRun + 910
18 CoreFoundation 0x016e0ac3 CFRunLoopRunSpecific + 467
19 CoreFoundation 0x016e08db CFRunLoopRunInMode + 123
20 GraphicsServices 0x036909e2 GSEventRunModal + 192
21 GraphicsServices 0x03690809 GSEventRun + 104
22 UIKit 0x0022cd3b UIApplicationMain + 1225
23 Project 0x00003a9d main + 141
24 libdyld.dylib 0x01d77725 start + 0
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
(Lame but I found the solution after I finished writing the question)
The reason for this error is I created an IBAction-UIButton method on touch up inside.
I deleted that code and hoped the traces were deleted.
It seems it wasnt, I had to unconnect the touch up inside by clicking the X in red squared spot.
I would try recreating the button and the segue, maybe you changed the IBOutlet name by accident or any other thing.
GL HF

Unwind segue issue when navigating back to parent scene

I'm trying to unwind segue form a scene. It works fine but I need to get a value to the parent screen. (I use the push segue to navigate from parent to child scene)
I'm calling the unwind segue like this
- (IBAction)done:(UIStoryboardSegue *)segue {
NSLog(#"gonna navigate");
RESTToppingTableViewController *vc = [segue destinationViewController];
[self setSelectedToppings:[vc toppingList]];
NSLog(#"%#", [vc toppingList]);
}
But the issue is, it seems the toppingList array is removed from memory even before the parent view is called.
Below is the error I got.
2013-12-06 13:26:42.192 Pizza to Go[2319:a0b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[RESTAddToCartViewController toppingList]: unrecognized selector sent to instance 0x9b681a0'
*** First throw call stack:
(
0 CoreFoundation 0x01f405e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x01cc38b6 objc_exception_throw + 44
2 CoreFoundation 0x01fdd903 -[NSObject(NSObject) doesNotRecognizeSelector:] + 275
3 CoreFoundation 0x01f3090b ___forwarding___ + 1019
4 CoreFoundation 0x01f304ee _CF_forwarding_prep_0 + 14
5 Pizza to Go 0x0004a3a2 -[RESTAddToCartViewController done:] + 130
6 libobjc.A.dylib 0x01cd581f -[NSObject performSelector:withObject:] + 70
7 UIKit 0x010d01f1 -[UIStoryboardUnwindSegueTemplate _perform:] + 536
8 UIKit 0x00f660f9 -[UIStoryboardSegueTemplate perform:] + 115
9 libobjc.A.dylib 0x01cd5874 -[NSObject performSelector:withObject:withObject:] + 77
10 UIKit 0x00a330c2 -[UIApplication sendAction:to:from:forEvent:] + 108
11 UIKit 0x00d07c9b -[UIBarButtonItem(UIInternal) _sendAction:withEvent:] + 139
12 libobjc.A.dylib 0x01cd5874 -[NSObject performSelector:withObject:withObject:] + 77
13 UIKit 0x00a330c2 -[UIApplication sendAction:to:from:forEvent:] + 108
14 UIKit 0x00a3304e -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 61
15 UIKit 0x00b2b0c1 -[UIControl sendAction:to:forEvent:] + 66
16 UIKit 0x00b2b484 -[UIControl _sendActionsForEvents:withEvent:] + 577
17 UIKit 0x00b2a733 -[UIControl touchesEnded:withEvent:] + 641
18 UIKit 0x00a7051d -[UIWindow _sendTouchesForEvent:] + 852
19 UIKit 0x00a71184 -[UIWindow sendEvent:] + 1232
20 UIKit 0x00a44e86 -[UIApplication sendEvent:] + 242
21 UIKit 0x00a2f18f _UIApplicationHandleEventQueue + 11421
22 CoreFoundation 0x01ec983f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
23 CoreFoundation 0x01ec91cb __CFRunLoopDoSources0 + 235
24 CoreFoundation 0x01ee629e __CFRunLoopRun + 910
25 CoreFoundation 0x01ee5ac3 CFRunLoopRunSpecific + 467
26 CoreFoundation 0x01ee58db CFRunLoopRunInMode + 123
27 GraphicsServices 0x03e159e2 GSEventRunModal + 192
28 GraphicsServices 0x03e15809 GSEventRun + 104
29 UIKit 0x00a31d3b UIApplicationMain + 1225
30 Pizza to Go 0x000574ad main + 141
31 libdyld.dylib 0x0285e725 start + 0
)
libc++abi.dylib: terminating with uncaught exception of type NSException
What could be the possible fix? thanks for your time in advance.
I'm not sure but I think your destinationViewController isn't a RESTToppingTableViewController.
The log:
-[RESTAddToCartViewController toppingList]:
unrecognized selector sent to instance 0x9b681a0
states that you are trying to get the toppingList of a RESTAddToCartViewController but this controller has no toppingList property.
Make sure that the UIViewController returned by [segue destinationViewController] really is what you are expecting.

Resources