Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/23.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 对于';没有可见的@界面;UIButton';声明选择器';setTitle';_Ios_Objective C_Mobile - Fatal编程技术网

Ios 对于';没有可见的@界面;UIButton';声明选择器';setTitle';

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

好的,我刚从目标c和目标iv开始,得到了一个非常随机的错误,我不确定它想向我指出什么 我在xviewContoller.h上有这个

@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信号,没有错误代码,但是错误消息,会告诉你一些错误。我想是因为我在故事板上有一个文本输入机器人,它没有链接到任何东西。