Up vote 0 down vote favorite share g+ share fb share tw.
I am getting this error when I load a new tableview onto my navigational stack. All of the data displays in the table that I am parsing onto it however once that has finished the app stops working and I get this error. Just wondering if anyone knows what the problem might be?
Or how I might be able to debug it? If you need more code let me know I just don't know what to provide because I'm not sure what the error refers too. -VehicleResultViewController stopAnimating: unrecognized selector sent to instance 0x6a2a680 iphone ios uitableview uiviewcontroller link|improve this question asked Jan 11 at 19:57C.
Johns898219 76% accept rate.
1 It looks like you're trying to stop a UIActivityIndicatorView from animating. This message send is a good place to start looking. The activity indicator may have been released but the pointer is still pointing to the same space in memory where an instance of VehicleResultViewController now resides.
– Mark Adams Jan 11 at 19:59 Is there stopAnimating method in your VehicleResultViewController class? Its either sending stopAnimating message sent to VehicleResultViewController and if its not defined anywhere. Or NSZombieEnabled turn it on to see if you are sending message to released objects.
– 0x8badf00d Jan 11 at 20:00 I tuned NSZombie on but nothing different happened when running, – C. Johns Jan 11 at 20:05 @Mark Adams, I do have ActivityIndicators in the mainview.. but this is falling over in the subbview do you think it could still be those activityindicators – C. Johns Jan 11 at 20:06.
You need to post more code. In general, an unrecognized selector error occurs when you try to invoke a method on a class that does not have the method implemented. Is VehicleResultViewController a UITableViewController/UIViewController?
Have you added the stopAnimating method? UIViewController and it's subclass, UITableViewController do not have a stopAnimating method in their default implementation. If it's a UITableViewController or a UIViewController and you haven't added a stopAnimating method, then you're calling a method that VehicleResultViewController does not have hence the crash.
It's really hard to answer your question more accurately until you: Post code for where you call the method Post the header file for VehicleResultViewController so we can see what kind of class is it (or you could just tell us). It could also be (and more probably is) that you have a UIActivityIndicatorView in your code which you want to stop spinning. In that case, are you sure it's named 'vehicleResultViewController'?
Whatever your UIActivityIndicatorView is named, try calling: whatever_your_activity_indicator_view_is_named stopAnimating.
Okay I have solved it.. The thing here Is, the stopanimating was confusing me, I thought it was to do with my ActivityIndicators on my main view. So I looked though my second ViewController again and realized that I am calling stopAnimating but have not yet made it. I got mixed up thinking the error was else where, this is the code thats calling the method //removies the SVProgressHUD NSTimer scheduledTimerWithTimeInterval:0.25 target:self selector:@selector(stopAnimating) userInfo:nil repeats:NO; sorry for the confusion, thank you very much for the help.
– C. Johns Jan 11 at 20:14 1 Okay, I'm glad it's solved. I have a tiny suggestion that will help you in future debugging.... try staying away from method names that clash with standard iOS class methods (stopAnimating is a method in UIActivityIndicatorView).
This will definitely help you in debugging, and getting better answers ( ;) ) on SO (and, of course, it's not a best practice) – Sid Jan 11 at 20:18 yep good point I'm defiantly changing it.. gosh what an idiot. – C. Johns Jan 11 at 20:49 lol don't be too hard on yourself.. cheers!
– Sid Jan 11 at 22:18.
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.