2014-03-19 77 views
0
- (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]; 
      } 
     } 
    } 

} 

在虚空ButtonPressed有,说Use of undeclared ButtonPressed 如果我用这个没有动作的应用程序建立一个崩溃的错误。我把那里的异常断点,并给出了此错误IBAction为未知错误

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) 
+0

你忘了支撑**} **?正确的必须是:' - (IBAction)ButtonPress:(UIButton *)sender {}' – lee

+0

哦,我以为我必须在虚空的尽头。生病测试 – user3436851

+0

为什么你把IBAction中的 - (void)方法? – Granit

回答

0

你不能把一个无效功能为- (IBAction为)ButtonPress:(UIButton的*)发件人改变它如下:

- (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

我改变了它,但我做了这个错误后出现'2014-03-19 10:41:54.497 AbteiRD [9272:70b]找不到可执行文件CFBundle 0x8a81ca0(未加载) 2014-03-19 10:42:01.280 AbteiRD [9272:70b] - [mainViewController ButtonPressed:]:无法识别的选择器发送到实例0x8ab5be0 (lldb)' – user3436851

+0

更改您的代码后。去xib的文件,并重新为你的**按钮的动作** – lee

+0

我已经这样做了,但现在真正的巨大错误出现了它的最后部分':CGContextSetBlendMode:无效的上下文0x0。这是一个严重的错误。此应用程序或其使用的库正在使用无效的上下文,从而导致系统稳定性和可靠性的整体降级。这个通知是礼貌的:请解决这个问题。这将成为即将到来的更新中的致命错误。 (lldb)' – user3436851