{"id":4236,"date":"2014-03-30T09:25:05","date_gmt":"2014-03-30T09:25:05","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/nsinvalidargumentexception-unrecognized-selector-sent-to-instance-collection-of-common-programming-errors\/"},"modified":"2014-03-30T09:25:05","modified_gmt":"2014-03-30T09:25:05","slug":"nsinvalidargumentexception-unrecognized-selector-sent-to-instance-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/nsinvalidargumentexception-unrecognized-selector-sent-to-instance-collection-of-common-programming-errors\/","title":{"rendered":"NSInvalidArgumentException: unrecognized selector sent to instance-Collection of common programming errors"},"content":{"rendered":"<p>When I run my application I get this error:<\/p>\n<pre><code>    Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-\n     [UIRoundedRectButton copyWithZone:]: unrecognized selector sent to instance\n     0xcc86970'\n<\/code><\/pre>\n<p>Why I get an error like this? I was careful to check all connection of IBOutlets e all IBAction. This is my code:<\/p>\n<p>MenuViewController.h<\/p>\n<pre><code>     @interface MenuViewController : UIViewController\n{\n\n}\n\n\n@property (nonatomic, copy) IBOutlet UITableView * tableView;\n@property (nonatomic,copy) IBOutlet UILabel *labelTitle;\n@property (nonatomic, copy) IBOutlet UIButton *buttonHome;\n@property (nonatomic, copy) IBOutlet UIButton *buttonMap;\n@property (nonatomic, copy) IBOutlet UIButton *buttonFavorites;\n\n -(IBAction) pressedHome:(id)sender;\n-(IBAction) pressedMap: (id)sender;\n-(IBAction) pressedFavorites: (id)sender;\n\n @end\n<\/code><\/pre>\n<p>In MenuViewController.m<\/p>\n<pre><code> -(IBAction) pressedHome:(id)sender{\n\n     MenuViewController * menu =[[MenuViewController alloc]initWithNibName:@\"MenuViewController\" bundle:nil];\n   [self.navigationController pushViewController:menu animated:YES];\n\n\n    }\n\n  -(IBAction) pressedMap: (id)sender{\n\n       MapViewController * map =[[MapViewController alloc]initWithNibName:@\"MapViewController\" bundle:nil];\n       [self.navigationController pushViewController:map animated:YES];\n   }\n\n\n  -(IBAction) pressedFavorites: (id)sender{\n\n        FavoritesViewController * favorites =[[FavoritesViewController alloc]initWithNibName:@\"FavoritesViewController\" bundle:nil];\n       [self.navigationController pushViewController:favorites animated:YES];\n   }\n<\/code><\/pre>\n<p>Thanks in advance<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When I run my application I get this error: Terminating app due to uncaught exception &#8216;NSInvalidArgumentException&#8217;, reason: &#8216;- [UIRoundedRectButton copyWithZone:]: unrecognized selector sent to instance 0xcc86970&#8217; Why I get an error like this? I was careful to check all connection of IBOutlets e all IBAction. This is my code: MenuViewController.h @interface MenuViewController : UIViewController { [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-4236","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4236","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=4236"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4236\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=4236"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=4236"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=4236"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}