Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/variables/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios NSInvalidArgumentException:发送到实例的选择器无法识别_Ios_Variables_Compiler Errors_Iboutlet - Fatal编程技术网

Ios NSInvalidArgumentException:发送到实例的选择器无法识别

Ios NSInvalidArgumentException:发送到实例的选择器无法识别,ios,variables,compiler-errors,iboutlet,Ios,Variables,Compiler Errors,Iboutlet,当我运行应用程序时,出现以下错误: Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '- [UIRoundedRectButton copyWithZone:]: unrecognized selector sent to instance 0xcc86970' 为什么我会犯这样的错误?我仔细检查了所有IBE插座的连接和所有IBAction。这是我的代码:

当我运行应用程序时,出现以下错误:

    Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-
     [UIRoundedRectButton copyWithZone:]: unrecognized selector sent to instance
     0xcc86970'
为什么我会犯这样的错误?我仔细检查了所有IBE插座的连接和所有IBAction。这是我的代码:

MenuViewController.h

     @interface MenuViewController : UIViewController
<UITableViewDelegate, UITableViewDataSource>{

}


@property (nonatomic, copy) IBOutlet UITableView * tableView;
@property (nonatomic,copy) IBOutlet UILabel *labelTitle;
@property (nonatomic, copy) IBOutlet UIButton *buttonHome;
@property (nonatomic, copy) IBOutlet UIButton *buttonMap;
@property (nonatomic, copy) IBOutlet UIButton *buttonFavorites;

 -(IBAction) pressedHome:(id)sender;
-(IBAction) pressedMap: (id)sender;
-(IBAction) pressedFavorites: (id)sender;

 @end

提前感谢您删除以下属性

@property (nonatomic) IBOutlet UITableView * tableView;
@property (nonatomic) IBOutlet UILabel *labelTitle;
@property (nonatomic) IBOutlet UIButton *buttonHome;
@property (nonatomic) IBOutlet UIButton *buttonMap;
@property (nonatomic) IBOutlet UIButton *buttonFavorites;

删除以下属性的
copy

@property (nonatomic) IBOutlet UITableView * tableView;
@property (nonatomic) IBOutlet UILabel *labelTitle;
@property (nonatomic) IBOutlet UIButton *buttonHome;
@property (nonatomic) IBOutlet UIButton *buttonMap;
@property (nonatomic) IBOutlet UIButton *buttonFavorites;

删除
副本
。发生这种情况是因为UIButton(和其他uicontrol)不符合
NSCopying
协议,因此复制它们的调用失败。

删除
复制
。发生这种情况是因为UIButton(和其他uicontrol)不符合
NSCopying
协议,因此复制它们的调用失败。

您想对此做什么?你能添加一些评论吗?这就足够修复撞车了,但是你想怎么做呢?你能添加一些评论吗?这足以修复崩溃,但是