unrecognized-selector

Breaking on unrecognized selector

懵懂的女人 提交于 2019-11-27 05:56:03
问题 Is it possible to set a break point on this bit of feedback in the console? This would make handling this problem so much easier. 回答1: Unrecognized selector is an exception, and you can set a breakpoint on exceptions. In Xcode 4, go to the breakpoint navigator, click the +, and choose "Add Exception Breakpoint". Under Exception, choose Objective-C. Under Break, choose On Throw. It should look like this when you're done: 来源: https://stackoverflow.com/questions/7354169/breaking-on-unrecognized

Using global variables in Objective-C

僤鯓⒐⒋嵵緔 提交于 2019-11-27 00:15:32
问题 First of all, I tried almost all the solutions given in stackoverflow but I didn't succeed in implement global vars, I even did a step by step tutorial and still I get the same errors. heres the issue: I have a program with severals views, I'd like to use variables on all of the views, so I used global variables, I have: GlobalVars.h #import <UIKit/UIKit.h> extern NSArray *truckBoxes; extern NSArray *farmerlist; extern NSString *farmerCardNumber; extern NSString *fName; @interface GlobalVars

“unrecognized selector sent to instance” error in Objective-C

[亡魂溺海] 提交于 2019-11-26 03:28:05
问题 I created a button and added an action for it, but as soon as it invoked, I got this error: -[NSCFDictionary numberButtonClick:]: unrecognized selector sent to instance 0x3d03ac0 2010-03-16 22:23:58.811 Money[8056:207] *** Terminating app due to uncaught exception \'NSInvalidArgumentException\', reason:\'*** -[NSCFDictionary numberButtonClick:]: unrecognized selector sent to instance 0x3d03ac0\' This is my code: - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil