Question

    - (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];
            }
        }
    }

}

At Void ButtonPressed there is an Error that says Use of undeclared ButtonPressed And if I use this without the action the App build crashes . I put there an Exception Breakpoint and it gives out this error

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) 
Was it helpful?

Solution

you cannot put a void function into - (IBAction)ButtonPress:(UIButton *)sender change it as follow:

    - (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];
            }
         }
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top