Reputation: 1681
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
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