永久性无法识别的选择器错误[Storyboards] [英] Persistent unrecognized selector error [Storyboards]
问题描述
我已经用按钮和功能设置了一百万个视图.但是由于某种原因,我无法使它正常工作-我已经将它重新制作了3次...我不知道为什么它不起作用...
I have set up a million and one views with button's and functions. But for some reason I can't get this one to work - I've re-made it 3 times now ... I have no idea why it's not working...
从我得到的错误中我了解到,这与情节提要有关(此问题 ...),因为它在错误中显示: [UIViewController click_newsletter:]
而不是 [LinkedinActionViewController click_newsletter:]
.
From the error that I'm getting I understand it has something to do with the storyboard (this question, this question...) because in the error it says: [UIViewController click_newsletter:]
not [LinkedinActionViewController click_newsletter:]
.
问题是,我删除了旧的viewController并做了一个新的,什么都没改变?
The problem is, I deleted the old viewController and made a new one and nothing changed?
在故事板上-类名是相同的.
In the story board - the class name is the same.
@interface LinkedinActionViewController : UINavigationController <UIWebViewDelegate>{
UIButton *our_page;
UIButton *newsletter;
}
@property (nonatomic, retain) IBOutlet UIButton *our_page;
@property (nonatomic, retain) IBOutlet UIButton *newsletter;
- (IBAction)click_our_page:(id)sender;
- (IBAction)click_newsletter:(id)sender;
@end
打开视图
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard_iPad" bundle:nil];
LinkedinActionViewController *action_view = (LinkedinActionViewController*)[[storyboard instantiateViewControllerWithIdentifier:@"LinkedinActionViewController"] retain];
[self.navigationController pushViewController:action_view animated:YES];
ERRROR !!!
***由于未捕获的异常'NSInvalidArgumentException'而终止应用程序,原因:'-[UIViewControllerclick_newsletter:]:无法识别的选择器已发送到实例0x6d205a0'
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIViewController click_newsletter:]: unrecognized selector sent to instance 0x6d205a0'
为此,我已经在墙上砸了头-任何帮助都将是有益的!:D谢谢!
I've hit my head on the wall with this for over a day - any help would be beneficial! :D THANKS!
推荐答案
好的,只是让一个朋友看了一下,我们发现了问题所在.
Alright, just had a friend take a look at this and we found the problem.
如果您转到 linkedinActionViewController.m
文件.
单击右侧窗格中的文件检查器按钮.
Click on file inspector button in the right pane.
然后确保选中复选框!@ !!!!
XCode可能会死于缓慢而痛苦的死亡!
May XCode die a slow and painful death!
这篇关于永久性无法识别的选择器错误[Storyboards]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!