-3

I am just starting out in ios and am trying to make user defined functions...

my code:

-(void) testFunction{
    //has self. calls
}

 -(IBAction)button:(id)sender { 
       testFunction();
}

I get the warning: Implicit declaration of function is invalid in C99

What am I doing wrong? Or what do I have to add to my code?

Sebastian
  • 7,670
  • 5
  • 38
  • 50
slowsword
  • 314
  • 2
  • 14

1 Answers1

2

In Objective-C you cant write testFunction(). You send 'messages' and you can do this via

[self testFunction]
mr.VVoo
  • 2,265
  • 20
  • 30