- (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就会崩溃。我在那里放置了一个异常断点,它给出了这个错误。
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) 发布于 2014-03-19 09:40:28
不能将void函数放入- (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];
}
}
}https://stackoverflow.com/questions/22501471
复制相似问题