Ios 对于';没有可见的@界面;UIButton';声明选择器';setTitle';
好的,我刚从目标c和目标iv开始,得到了一个非常随机的错误,我不确定它想向我指出什么 我在xviewContoller.h上有这个Ios 对于';没有可见的@界面;UIButton';声明选择器';setTitle';,ios,objective-c,mobile,Ios,Objective C,Mobile,好的,我刚从目标c和目标iv开始,得到了一个非常随机的错误,我不确定它想向我指出什么 我在xviewContoller.h上有这个 @property (weak, nonatomic) IBOutlet UIButton *helloButton; 在xviewController.m上以及 - (IBAction)showAlrt:(id)sender; 在本页底部的方法中使用 - (IBAction)showAlrt:(id)sender { UIAlertView* ale
@property (weak, nonatomic) IBOutlet UIButton *helloButton;
在xviewController.m上以及
- (IBAction)showAlrt:(id)sender;
在本页底部的方法中使用
- (IBAction)showAlrt:(id)sender {
UIAlertView* alert = [[UIAlertView alloc]
initWithTitle:@"xxxx"
message:@"xxxx"
delegate:nil
cancelButtonTitle:@"Close"
otherButtonTitles:nil];
[alert show];
[self.helloButton setTitle:@"click"]
forState:UIControlStateNormal];
}
然后我得到了这个错误
“UIButton”没有可见的@interface声明选择器“setTitle”
在like[self.helloButton setTitle…”上
有人能帮忙吗
[self.helloButton setTitle:@"click"]
forState:UIControlStateNormal];
改为
[self.helloButton setTitle:@"click" forState:UIControlStateNormal];
我认为我的@property设置有问题,但我也不确定该怎么改变它:(我的天哪,这只是一个)导致我出现问题的原因:(谢谢tho:)我习惯于C和C++,这是非常不同的,所以有错误指南的参考指南吗?我现在有一个线程1:SIGABRTNo信号,没有错误代码,但是错误消息,会告诉你一些错误。我想是因为我在故事板上有一个文本输入机器人,它没有链接到任何东西。