user2588945
user2588945

Reputation: 1681

How would I call this method from another method?

How would I call this method from another method:

I know how to link it up in IB etc, but how do I call it from the aButtonPress method I have below. I can't figure out the syntax.

- (void)buttonPressed:(UIBarButtonItem *)button{


}

-(void)aButtonPress {    

    [self buttonPressed:nil];
}

thanks for help

Upvotes: 0

Views: 108

Answers (1)

Varghese Abraham
Varghese Abraham

Reputation: 51

the way you are calling it would work. passing nil to the UI handler is OK. but put a null check to avoid unnecessary crashes/BAD ACCESS.

Upvotes: 1

Related Questions