Using Images In Buttons

Designing Graphics Use a 10px rounded corner for iPhone and iPad button graphics if you want to match the standard button shape. If not set the button 'Type' to 'Custom' so that is become transparent other than your image. Dealing with iPhone4 vs iPhone3 resolutions You can list any image as [email protected] along with Image.png […]

Read More

Changing Button Properties

Changing In A Method Called By A Button – (IBAction)MyButton:(id)sender { UIButton *ThisButton = (UIButton *)sender; [ThisButton setTitle:@”1234″ forState:UIControlStateNormal]; ThisButton.titleLabel.font = [UIFont systemFontOfSize:9]; } Changing From Anywhere In the .h file add this IBOutlet UIButton *MyButton; Link the button in interface builder If your View could get unloaded you must release objects you’ve created (or […]

Read More

Adding A Button

Define in the .h file } – (IBAction)myButtonPressed:(id)sender; Create the function – (IBAction)myButtonPressed:(id)sender { } Connect In Interface Builder Right click, select ‘Touch Up Inside’ and drag button onto ‘Files Owner’, select myMethodName If you want to call the function from other code [self myButtonPressed:nil];

Read More