when i use this line to draw graph my app quits
CPGraphHostingView *hostingView = (CPGraphHostingView *)self.view;
hostingView.hostedGraph = barChart;
error
[UIView setHostedGraph:]: unrecognized selector sent to instance 0x595fb20
2011-06-11 11:00:14.452 CGH[4909:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIView setHostedGraph:]: unrecognized selector sent to instance 0x595fb20'
how to fix this issue , i have included all lib correctly
#### Update
i am using it again but i am getting this error , i have connected the class in nib file
2011-09-28 14:53:06.791 Ihope_test_sql[9307:707] Unknown class CPTGraphHostingView in Interface Builder file.
2011-09-28 14:53:06.795 Ihope_test_sql[9307:707] Unknown class CPTGraphHostingView in Interface Builder file.
2011-09-28 14:53:06.797 Ihope_test_sql[9307:707] Unknown class CPTGraphHostingView in Interface Builder file.
2011-09-28 14:53:06.800 Ihope_test_sql[9307:707] Unknown class CPTGraphHostingView in Interface Builder file.
2011-09-28 14:53:06.847 Ihope_test_sql[9307:707] -[UIView setHostedGraph:]: unrecognized selector sent to instance 0x1cd920
2011-09-28 14:53:06.875 Ihope_test_sql[9307:707] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIView setHostedGraph:]: unrecognized selector sent to instance 0x1cd920'
*** Call stack at first throw:
It seems you are hosting graph in a normal view. Did you follow core-plot sample? Try change UIView Class to CPGraphHostingView in interfaceBuilder. You will not get crash igonre the warnings of interface builder.
Related
I am having a tableview which i created using iboutlet.and when i am trying to reload table it is giving this exception.
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSCFString objectAtIndex:]: unrecognized selector sent to instance 0x5949310'
IBOutlet UITableView *tableStudent;
here is .h and .m files.
.h
IBOutlet UITableView *tableStudent;
-(IBAction)enabeluser;
.m
-(IBAction)enabeluser{
[tableStudent reloadData];
}
your array has got released at that time you call realodData method.
NSInvalidArgumentException occur when you refer to non-existing object. You might have release datasource or tableview object in the class.
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?
Im trying to work with UISearchDisplay controller
the application is launching correctly. When i start typing in the UISearchbarController its showing the following exception and exiting the application.
The exception is as follows:
[BrowserViewController tableView:numberOfRowsInSection:]: unrecognized selector sent to instance 0x5b4ccc0
2010-08-13 11:59:58.469 MixedApplication[7297:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[BrowserViewController tableView:numberOfRowsInSection:]: unrecognized selector sent to instance 0x5b4ccc0'
Can you post your code for the tableView:numberOfRowsInSection?
EDIT: UISearchBar will not work for a UIWebView
I created a tableView which worked fine in a single view app but as soon as I changed the view controller for a Tab Bar Controller and tapped the tab for the view with the table view in I suddenly get this! What has gone wrong?
[Session started at 2010-03-28 15:30:15 +0100.]
2010-03-28 15:30:17.763 LogbookTable[13473:207] *** -[UIViewController tableView:numberOfRowsInSection:]: unrecognized selector sent to instance 0x3b14d10
2010-03-28 15:30:17.765 LogbookTable[13473:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[UIViewController tableView:numberOfRowsInSection:]: unrecognized selector sent to instance 0x3b14d10'
2010-03-28 15:30:17.766 LogbookTable[13473:207] Stack: (
29303899,
2465178889,
29685819,
29255286,
29107906,
4372518,
4379894,
4378891,
3095430,
3035941,
3077376,
3065931,
55820976,
55820399,
55818438,
55817530,
2739877,
2763572,
2745983,
2773089,
37399897,
29088640,
29084744,
2739733,
2777007,
10496,
10350
)
You have an UIViewController somewhere, that should be an UITableViewController. Check your view hierarchy in Interface Builder.
I have a problem with my application for the iPhone.
It's a tab based application. In one of the tabs, I have a Table View. I have set it up to load in data from a PLIST.
My problem is that when I try to build and run it, the application either crashes, or stays at a black screen with the error message "Terminating app due to uncaught exception".
I looked in the console, and found that the error probably laid in this string:
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return workouts.count;
}
(error message:)
2010-02-06 21:50:54.733 Mudo[52439:207] *** -[FirstViewController tableView:numberOfRowsInSection:]: unrecognized selector sent to instance 0x39101a0
2010-02-06 21:50:54.735 Mudo[52439:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[FirstViewController tableView:numberOfRowsInSection:]: unrecognized selector sent to instance 0x39101a0'
2010-02-06 21:50:54.736 Mudo[52439:207] Stack: (
29344859,
2569487625,
29726779,
29296246,
29148866,
4413562,
4420938,
4419935,
3136474,
3076985,
3118420,
3106975,
55857840,
55857263,
55855302,
55854394,
2780921,
2804616,
2787027,
2814133,
37441233,
29129600,
29125704,
2780777,
2818051
)
Building the app does not generate any errors.
Please help me? Thanks :)
If you look at the actual text of the exception, 'NSInvalidArgumentException', reason: '*** -[FirstViewController tableView:numberOfRowsInSection:]: unrecognized selector sent to instance 0x39101a0', you can see the root of the problem. Somewhere in your code you're calling tableView:numberOfRowsInSection: on a FirstViewController, which doesn't implement that method.
Exceptions are not caught at compile-time, but rather thrown at runtime. You may want to read up on them if you aren't familiar, as they're a fairly important part of many programming languages.
http://en.wikipedia.org/wiki/Exception_handling
I'm guessing, since FirstViewController is one of the standard example classes created when starting a new Tab Bar based application in Xcode that you haven't changed its super class or implemented the methods of UITabeViewDelegate and UITableViewDataSource.
Either that or you've implemented the methods from those protocols in another class, but set FirstViewController as the table view's delegate/datasource.
We need more information to know for sure.