i am getting this error when trying to presenting view controller. actuallly i am testing this project on ios 4.3 simulator.on other simuators it works fine. this is non arc project. which is supported for ios 4.3 and onward.
request on uploadmanager:<NSMutableURLRequest http://www.livebinders.com/filetree/ipad>
2013-10-12 14:00:54.690 LiveBinders[1703:13b03] -[UploadManagerViewController presentViewController:animated:]: unrecognized selector sent to instance 0x6605a30
2013-10-12 14:00:54.695 LiveBinders[1703:13b03] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UploadManagerViewController presentViewController:animated:]: unrecognized selector sent to instance 0x6605a30'
*** Call stack at first throw:
(
0 CoreFoundation 0x01ca85a9 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x017bc313 objc_exception_throw + 44
2 CoreFoundation 0x01caa0bb -[NSObject(NSObject) doesNotRecognizeSelector:] + 187
3 CoreFoundation 0x01c19966 ___forwarding___ + 966
4 CoreFoundation 0x01c19522 _CF_forwarding_prep_0 + 50
5 LiveBinders 0x0003baa8 -[UploadManagerViewController openEvernote] + 248
6 LiveBinders 0x00068e4b -[TableVC tableView:didSelectRowAtIndexPath:] + 171
7 UIKit 0x00b97b68 -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:] + 1140
8 UIKit 0x00b8db05 -[UITableView _userSelectRowAtPendingSelectionIndexPath:] + 219
9 Foundation 0x012a779e __NSFireDelayedPerform + 441
10 CoreFoundation 0x01c898c3 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 19
11 CoreFoundation 0x01c8ae74 __CFRunLoopDoTimer + 1220
12 CoreFoundation 0x01be72c9 __CFRunLoopRun + 1817
13 CoreFoundation 0x01be6840 CFRunLoopRunSpecific + 208
14 CoreFoundation 0x01be6761 CFRunLoopRunInMode + 97
15 GraphicsServices 0x01dfc1c4 GSEventRunModal + 217
16 GraphicsServices 0x01dfc289 GSEventRun + 115
17 UIKit 0x00b2ec93 UIApplicationMain + 1160
18 LiveBinders 0x0000285d main + 93
19 LiveBinders 0x000027b5 start + 53
<----- calling this method on presenting new view controller ---->
-(void)openEvernote
{
self.dropboxShareLink = NULL;
self.dropBoxFileName = NULL;
EverNoteVC *everNoteVC = [[EverNoteVC alloc]initWithNibName:#"EverNoteView" bundle:nil];
everNoteVC.delegate = (id)self;
if (popoverController.isPopoverVisible) {
[popoverController dismissPopoverAnimated:NO];
}
[self presentViewController:everNoteVC animated:YES ];
[everNoteVC release];
}
presentViewController is not available in iOS versions prior 5.0.
Try with
[self presentModalViewController:everNoteVC animated:YES];
instead.
Related
I have implemented custom segue and custom unwind segue in a sample app using swift. custom segue is working properly but custom unwind segue give the following error:
2015-06-22 21:05:58.929 Test_Segue[7162:336393] -[__NSSetM perform:]: unrecognized selector sent to instance 0x7ffc89c190c0
2015-06-22 21:05:58.933 Test_Segue[7162:336393] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSSetM perform:]: unrecognized selector sent to instance 0x7ffc89c190c0'
*** First throw call stack:
(
0 CoreFoundation 0x000000010d27bc65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010b228bb7 objc_exception_throw + 45
2 CoreFoundation 0x000000010d2830ad -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
3 CoreFoundation 0x000000010d1d913c ___forwarding___ + 988
4 CoreFoundation 0x000000010d1d8cd8 _CF_forwarding_prep_0 + 120
5 UIKit 0x000000010b46bda2 -[UIApplication sendAction:to:from:forEvent:] + 75
6 UIKit 0x000000010b57d54a -[UIControl _sendActionsForEvents:withEvent:] + 467
7 UIKit 0x000000010b57c919 -[UIControl touchesEnded:withEvent:] + 522
8 UIKit 0x000000010b4b8998 -[UIWindow _sendTouchesForEvent:] + 735
9 UIKit 0x000000010b4b92c2 -[UIWindow sendEvent:] + 682
10 UIKit 0x000000010b47f581 -[UIApplication sendEvent:] + 246
11 UIKit 0x000000010b48cd1c _UIApplicationHandleEventFromQueueEvent + 18265
12 UIKit 0x000000010b4675dc _UIApplicationHandleEventQueue + 2066
13 CoreFoundation 0x000000010d1af431 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
14 CoreFoundation 0x000000010d1a52fd __CFRunLoopDoSources0 + 269
15 CoreFoundation 0x000000010d1a4934 __CFRunLoopRun + 868
16 CoreFoundation 0x000000010d1a4366 CFRunLoopRunSpecific + 470
17 GraphicsServices 0x000000010eeb4a3e GSEventRunModal + 161
18 UIKit 0x000000010b46a900 UIApplicationMain + 1282
19 Test_Segue 0x000000010acd8e87 main + 135
20 libdyld.dylib 0x000000010df33145 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
The source code of this sample app is uploaded on github, the link is as follows:
source code
I implement segue and add the animation and it works.
My app running perfectlly in iOS 5.1 and iOS 6.1. But wheen I try to run it on iOS 4.3 than it was crahing on this code:
[self.tabBarItem setFinishedSelectedImage:[UIImage imageNamed:#"home-active.png"] withFinishedUnselectedImage:[UIImage imageNamed:#"home-normal"]];
I'm using this code to seting image on TabBar.
This is my log information.
2013-03-08 15:16:27.688 GrandNatural[3372:12c03] -[UITabBarItem setFinishedSelectedImage:withFinishedUnselectedImage:]: unrecognized selector sent to instance 0x628c090
2013-03-08 15:16:27.690 GrandNatural[3372:12c03] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UITabBarItem setFinishedSelectedImage:withFinishedUnselectedImage:]: unrecognized selector sent to instance 0x628c090'
*** Call stack at first throw:
(
0 CoreFoundation 0x019785a9 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x016e7313 objc_exception_throw + 44
2 CoreFoundation 0x0197a0bb -[NSObject(NSObject) doesNotRecognizeSelector:] + 187
3 CoreFoundation 0x018e9966 ___forwarding___ + 966
4 CoreFoundation 0x018e9522 _CF_forwarding_prep_0 + 50
5 GrandNatural 0x0000f8fe -[HomeViewController initWithNibName:bundle:] + 535
6 GrandNatural 0x00002985 -[GrandNaturalAppDelegate application:didFinishLaunchingWithOptions:] + 262
7 UIKit 0x00ce5c89 -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1163
8 UIKit 0x00ce7d88 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 439
9 UIKit 0x00cf2617 -[UIApplication handleEvent:withNewEvent:] + 1533
10 UIKit 0x00ceaabf -[UIApplication sendEvent:] + 71
11 UIKit 0x00ceff2e _UIApplicationHandleEvent + 7576
12 GraphicsServices 0x021dd992 PurpleEventCallback + 1550
13 CoreFoundation 0x01959944 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
14 CoreFoundation 0x018b9cf7 __CFRunLoopDoSource1 + 215
15 CoreFoundation 0x018b6f83 __CFRunLoopRun + 979
16 CoreFoundation 0x018b6840 CFRunLoopRunSpecific + 208
17 CoreFoundation 0x018b6761 CFRunLoopRunInMode + 97
18 UIKit 0x00ce77d2 -[UIApplication _run] + 623
19 UIKit 0x00cf3c93 UIApplicationMain + 1160
20 GrandNatural 0x00002856 main + 132
21 GrandNatural 0x00002795 start + 53
)
terminate called throwing an exception(lldb)
You can set image on tabbar using this code :
if ([[[UIDevice currentDevice] systemVersion] floatValue]<5.0)
{
self.tabBarItem = [[UITabBarItem alloc] initWithTitle:#"your name" image:[UIImage imageNamed:#"home-normal"] tag:0];
}
else
{
self.tabBarItem = [[UITabBarItem alloc] init];
self.tabBarItem.title = #"your name";
[self.tabBarItem setFinishedSelectedImage:[UIImage imageNamed:#"home-active"] withFinishedUnselectedImage:[UIImage imageNamed:#"home-normal"]];
}
Ok, go to the documentation page for UITabBarItem, find that method, and tell me what it says under Availability
I'll give you a hint: 4.3 is not valid.
I have encountered application termination while dismissing a modal view controller.
-[NSCFString window]: unrecognized selector sent to instance 0x6337dc0
2011-06-03 13:26:37.980 Tuscany[19657:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSCFString window]: unrecognized selector sent to instance 0x6337dc0'
*** Call stack at first throw:
(
0 CoreFoundation 0x016ffbe9 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x018545c2 objc_exception_throw + 47
2 CoreFoundation 0x017016fb -[NSObject(NSObject) doesNotRecognizeSelector:] + 187
3 CoreFoundation 0x01671366 ___forwarding___ + 966
4 CoreFoundation 0x01670f22 _CF_forwarding_prep_0 + 50
5 UIKit 0x003f4024 -[UIViewController viewControllerForRotation] + 81
6 UIKit 0x003ee8ab -[UIViewController shouldWindowUseOnePartInterfaceRotationAnimation:] + 34
7 UIKit 0x00368dd5 -[UIWindow _clientsForRotation] + 350
8 UIKit 0x0036b87b -[UIWindow _setRotatableClient:toOrientation:updateStatusBar:duration:force:] + 141
9 UIKit 0x005eb948 -[UIWindowController transition:fromViewController:toViewController:target:didEndSelector:] + 1053
10 UIKit 0x003f7682 -[UIViewController _dismissModalViewControllerWithTransition:from:] + 2075
11 UIKit 0x003f4324 -[UIViewController dismissModalViewControllerWithTransition:] + 579
12 Foundation 0x000c37f6 __NSFireDelayedPerform + 441
13 CoreFoundation 0x016e0fe3 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 19
14 CoreFoundation 0x016e2594 __CFRunLoopDoTimer + 1220
15 CoreFoundation 0x0163ecc9 __CFRunLoopRun + 1817
16 CoreFoundation 0x0163e240 CFRunLoopRunSpecific + 208
17 CoreFoundation 0x0163e161 CFRunLoopRunInMode + 97
18 GraphicsServices 0x01d88268 GSEventRunModal + 217
19 GraphicsServices 0x01d8832d GSEventRun + 115
20 UIKit 0x0035342e UIApplicationMain + 1160
21 Tuscany 0x00002878 main + 102
22 Tuscany 0x00002809 start + 53
)
terminate called after throwing an instance of 'NSException'
Above is the crash log. Please help.
Thanks in advance.
From you log it seems that you are calling window on an NSCFString. NSCFString does not have a window selector, and the compiler would complain if you try and do so, so it is likely that you are sending that message to a deallocated object (imagine that a new object has been allocated where another one was previously), or you are messing with casts.
In case you suspect that you are sending the message to a deallocated object, enable NSZombies.
Without seeing the code, it is not possible to help you further, though.
I need to call a new modal view in the master view area after selecting a specific object from the initial list (tableview).
Tried this:
//new view init:
clientList *clientListCon = [[clientList alloc] initWithNibName:#"clientList" bundle:nil];
//pushing
[[splitViewController.viewControllers objectAtIndex:0] presentModalViewController:clientListCon animated:YES];
All I get:
MultipleDetailViews[12997:40b] -[UITableView presentModalViewController:animated:]: unrecognized selector sent to instance 0x584d800
2011-03-18 14:40:51.449 MultipleDetailViews[12997:40b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UITableView presentModalViewController:animated:]: unrecognized selector sent to instance 0x584d800'
*** Call stack at first throw:
(
0 CoreFoundation 0x017035a9 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x01857313 objc_exception_throw + 44
2 CoreFoundation 0x017050bb -[NSObject(NSObject) doesNotRecognizeSelector:] + 187
3 CoreFoundation 0x01674966 ___forwarding___ + 966
4 CoreFoundation 0x01674522 _CF_forwarding_prep_0 + 50
5 MultipleDetailViews 0x00008051 -[RootViewController tableView:didSelectRowAtIndexPath:] + 354
6 UIKit 0x00a8fb68 -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:] + 1140
7 UIKit 0x00a85b05 -[UITableView _userSelectRowAtPendingSelectionIndexPath:] + 219
8 Foundation 0x0079779e __NSFireDelayedPerform + 441
9 CoreFoundation 0x016e48c3 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 19
10 CoreFoundation 0x016e5e74 __CFRunLoopDoTimer + 1220
11 CoreFoundation 0x016422c9 __CFRunLoopRun + 1817
12 CoreFoundation 0x01641840 CFRunLoopRunSpecific + 208
13 CoreFoundation 0x01641761 CFRunLoopRunInMode + 97
14 GraphicsServices 0x0205a1c4 GSEventRunModal + 217
15 GraphicsServices 0x0205a289 GSEventRun + 115
16 UIKit 0x00a26c93 UIApplicationMain + 1160
17 MultipleDetailViews 0x000069a4 main + 102
18 MultipleDetailViews 0x00006935 start + 53
)
terminate called after throwing an instance of 'NSException'
It seems like it ought to be:
[self presentModalViewController:clientListCon animated:YES];
I have no idea how you are getting a reference to a UITableView from the provided code though.
I am trying to copy one array to another:
NSMutableArray *itemsCopy = [[NSMutableArray alloc] initWithArray:self.items copyItems:YES];
but I get the error:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[Item copyWithZone:]: unrecognized selector sent to instance 0x5a74900'
*** Call stack at first throw:
(
0 CoreFoundation 0x025afc99 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x026fd5de objc_exception_throw + 47
2 CoreFoundation 0x025b17ab -[NSObject(NSObject) doesNotRecognizeSelector:] + 187
3 CoreFoundation 0x02521496 ___forwarding___ + 966
4 CoreFoundation 0x02521052 _CF_forwarding_prep_0 + 50
5 CoreFoundation 0x025108fa -[NSObject(NSObject) copy] + 42
6 CoreFoundation 0x025ab732 -[NSArray initWithArray:range:copyItems:] + 290
7 CoreFoundation 0x02513963 -[NSArray initWithArray:copyItems:] + 99
8 MyViewController 0x0000787d -[MyViewController tableView:didSelectRowAtIndexPath:] + 258
9 UIKit 0x003968f8 -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:] + 1140
10 UIKit 0x0038d1de -[UITableView _userSelectRowAtIndexPath:] + 219
11 Foundation 0x000a404e __NSFireDelayedPerform + 441
12 CoreFoundation 0x025910c3 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 19
13 CoreFoundation 0x02592704 __CFRunLoopDoTimer + 1364
14 CoreFoundation 0x024ef089 __CFRunLoopRun + 1817
15 CoreFoundation 0x024ee600 CFRunLoopRunSpecific + 208
16 CoreFoundation 0x024ee521 CFRunLoopRunInMode + 97
17 GraphicsServices 0x02db52c8 GSEventRunModal + 217
18 GraphicsServices 0x02db538d GSEventRun + 115
19 UIKit 0x00332e8f UIApplicationMain + 1160
20 MyViewController 0x0000210c main + 102
21 MyViewController 0x0000209d start + 53
)
terminate called after throwing an instance of 'NSException'
You need to make sure all the contents of self.items adopt the NSCopying protocol.
If you just want a shallow copy, send the -mutableCopy message to self.items.
NSMutableArray *itemsCopy = [self.items mutableCopy];
You have to provide your classes with the copyWithZone selector (according to NSCopying protocol) if you are not copying objects that implement that protocol by default.
So if you are copying custom objects you have to implement it. The copy method always calls copyWithZone.. and you must always provide the implementation, it can't know what to copy inside objects by itself..