Skip to content

Commit

Permalink
Update start/save/cancel buttons for retina and stretch them to size.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lisa Zorn committed Jan 9, 2013
1 parent ee839bc commit 2b12f0c
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Classes/RecordTripViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,8 @@ - (void)viewDidLoad
[UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleBlackTranslucent;
self.navigationController.navigationBar.barStyle = UIBarStyleBlackTranslucent;

[startButton setBackgroundImage:[[UIImage imageNamed:@"start_button.png"] resizableImageWithCapInsets:UIEdgeInsetsMake(48,12,48,12) resizingMode: UIImageResizingModeStretch] forState:UIControlStateNormal];
[cancelButton setBackgroundImage:[[UIImage imageNamed:@"cancel_button.png"] resizableImageWithCapInsets:UIEdgeInsetsMake(48,12,48,12) resizingMode: UIImageResizingModeStretch] forState:UIControlStateNormal];
[startButton setBackgroundImage:[[UIImage imageNamed:@"start_button.png"] resizableImageWithCapInsets:UIEdgeInsetsMake(48,20,48,20) resizingMode: UIImageResizingModeStretch] forState:UIControlStateNormal];
[cancelButton setBackgroundImage:[[UIImage imageNamed:@"cancel_button.png"] resizableImageWithCapInsets:UIEdgeInsetsMake(48,20,48,20) resizingMode: UIImageResizingModeStretch] forState:UIControlStateNormal];

// init map region to San Francisco
MKCoordinateRegion region = { { 37.7620, -122.4350 }, { 0.10825, 0.10825 } };
Expand Down Expand Up @@ -464,7 +464,7 @@ - (void)doneRecordingDidCancel:(BOOL)didCancel {

// transform save button into start button
[startButton setTitle:@"Start" forState:UIControlStateNormal];
[startButton setBackgroundImage:[[UIImage imageNamed:@"start_button.png"] resizableImageWithCapInsets:UIEdgeInsetsMake(48,12,48,12) resizingMode: UIImageResizingModeStretch] forState:UIControlStateNormal];
[startButton setBackgroundImage:[[UIImage imageNamed:@"start_button.png"] resizableImageWithCapInsets:UIEdgeInsetsMake(48,20,48,20) resizingMode: UIImageResizingModeStretch] forState:UIControlStateNormal];
startButton.frame = CGRectMake( 24.0, 198.0, 272.0, kCustomButtonHeight );
cancelButton.hidden = TRUE;

Expand Down Expand Up @@ -533,7 +533,7 @@ - (IBAction)start:(UIButton *)sender

// transform start button into save button
[startButton setTitle:@"Save" forState:UIControlStateNormal];
[startButton setBackgroundImage:[[UIImage imageNamed:@"save_button.png"] resizableImageWithCapInsets:UIEdgeInsetsMake(48,12,48,12) resizingMode: UIImageResizingModeStretch] forState:UIControlStateNormal];
[startButton setBackgroundImage:[[UIImage imageNamed:@"save_button.png"] resizableImageWithCapInsets:UIEdgeInsetsMake(48,20,48,20) resizingMode: UIImageResizingModeStretch] forState:UIControlStateNormal];

startButton.frame = CGRectMake( 24.0, 198.0, kCustomButtonWidth, kCustomButtonHeight );
cancelButton.enabled = TRUE;
Expand Down
Binary file modified cancel_button.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added [email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified save_button.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added [email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified start_button.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added [email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 2b12f0c

Please sign in to comment.