Define in the .h file
}
- (IBAction)myButtonPressed:(id)sender;
- (IBAction)MyButton:(id)sender
{
UIButton *ThisButton = (UIButton *)sender;
[ThisButton setTitle:@"1234" forState:UIControlStateNormal];
ThisButton.titleLabel.font = [UIFont systemFontOfSize:9];
}
If you need to fake a touch event and not simply call a UIButtons method, you can use this:
[MyButtonName sendActionsForControlEvents: UIControlEventTouchUpInside];
Use a 10px rounded corner for iPhone and iPad button graphics if you want to match the standard button shape.
|
|
|
| Tweet | Follow @adampulley |
Home | iOS Developer Resources | Terms & Conditions | Login
© Copyright http://www.ios-developer.net. All rights reserved.