首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >IBAction未知误差

IBAction未知误差
EN

Stack Overflow用户
提问于 2014-03-19 09:34:05
回答 1查看 105关注 0票数 0
代码语言:javascript
复制
    - (IBAction)ButtonPress:(UIButton *)sender {


- (void) ButtonPressed: (id) sender
    {
        if (sender != self.done)
            return;
        if (self.zahlencode.text.length > 0)
        {
            zz =[self.zahlencode.text intValue];
            if(zz == a)
            {

                [self performSegueWithIdentifier:@"1" sender:self];
            }
        }
    }

}

在Void ButtonPressed中,有一个错误说是Use of undeclared ButtonPressed,如果我不使用这个操作,App就会崩溃。我在那里放置了一个异常断点,它给出了这个错误。

代码语言:javascript
复制
2014-03-19 10:19:53.295 AbteiRD[8873:70b] Cannot find executable for CFBundle 0x8a91780 </Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk/System/Library/AccessibilityBundles/CertUIFramework.axbundle> (not loaded)
(lldb) 
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-03-19 09:40:28

不能将void函数放入- (IBAction)ButtonPress:(UIButton *)发件人中,将其更改如下:

代码语言:javascript
复制
    - (IBAction)ButtonPress:(UIButton *)sender {
       if (sender != self.done)
            return;
        if (self.zahlencode.text.length > 0)
        {
            zz =[self.zahlencode.text intValue];
            if(zz == a)
            {

                [self performSegueWithIdentifier:@"1" sender:self];
            }
         }
}
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/22501471

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档