Skip to content

Commit

Permalink
commit some stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisballinger committed May 15, 2013
1 parent eb2e8c6 commit 5d2f950
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
1 change: 1 addition & 0 deletions OpenWatch/OWFancyLoginViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
@property (nonatomic, strong) UITextField *passwordField;
@property (nonatomic, strong) UILabel *blurbLabel;
@property (nonatomic, strong) UIButton *startButton;
@property (nonatomic, strong) UIButton *forgotPasswordButton;

@property (nonatomic, strong) OWKenBurnsView *backgroundImageView;
@property (nonatomic, strong) UIImageView *logoView;
Expand Down
19 changes: 17 additions & 2 deletions OpenWatch/OWFancyLoginViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ @interface OWFancyLoginViewController ()
@end

@implementation OWFancyLoginViewController
@synthesize backgroundImageView, logoView, blurbLabel, emailField, startButton, scrollView, passwordField, activityIndicatorView, processingLogin, keyboardControls;
@synthesize backgroundImageView, logoView, blurbLabel, emailField, startButton, scrollView, passwordField, activityIndicatorView, processingLogin, keyboardControls, forgotPasswordButton;


- (id)init
Expand All @@ -38,10 +38,22 @@ - (id)init
self.startButton = [[BButton alloc] initWithFrame:CGRectZero type:BButtonTypeSuccess];
self.activityIndicatorView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhite];
self.processingLogin = NO;
self.forgotPasswordButton = [UIButton buttonWithType:UIButtonTypeCustom];
[self.forgotPasswordButton setTitle:@"Forgot password?" forState:UIControlStateNormal];
self.forgotPasswordButton.titleLabel.font = [UIFont systemFontOfSize:14.0f];
self.forgotPasswordButton.titleLabel.textColor = [UIColor whiteColor];
self.forgotPasswordButton.titleLabel.shadowColor = [UIColor blackColor];
self.forgotPasswordButton.titleLabel.shadowOffset = CGSizeMake(0, -1);
self.forgotPasswordButton.titleLabel.textAlignment = NSTextAlignmentRight;
[self.forgotPasswordButton addTarget:self action:@selector(forgotPassword:) forControlEvents:UIControlEventTouchUpInside];
}
return self;
}

- (void) forgotPassword:(id)sender {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"https://openwatch.net/accounts/password/reset/"] forceOpenInSafari:YES];
}

- (void) loadView {
[super loadView];
self.backgroundImageView = [[OWKenBurnsView alloc] initWithFrame:self.view.frame];
Expand Down Expand Up @@ -77,6 +89,7 @@ - (void) loadView {
[self.scrollView addSubview:blurbLabel];
[self.scrollView addSubview:emailField];
[self.scrollView addSubview:startButton];
[self.scrollView addSubview:forgotPasswordButton];
[self.startButton addSubview:activityIndicatorView];
}

Expand All @@ -99,8 +112,10 @@ - (void) viewWillAppear:(BOOL)animated {
CGFloat logoWidth = self.view.frame.size.width - xPadding * 2;
self.logoView.frame = CGRectMake(xPadding, yPadding, logoWidth, 100.0f);
self.blurbLabel.frame = CGRectMake(xPadding, [OWUtilities bottomOfView:logoView] + 25, logoWidth, 65);
self.emailField.frame = CGRectMake(xPadding, [OWUtilities bottomOfView:blurbLabel] + 20, logoWidth, 30);
self.emailField.frame = CGRectMake(xPadding, [OWUtilities bottomOfView:blurbLabel] + 20, logoWidth, 27);
self.startButton.frame = CGRectMake(xPadding, [OWUtilities bottomOfView:emailField] + 20, logoWidth, 50);
CGFloat forgotWidth = 120;
self.forgotPasswordButton.frame = CGRectMake([OWUtilities rightOfView:startButton] - forgotWidth, [OWUtilities bottomOfView:startButton] + 20, forgotWidth, 30);

self.activityIndicatorView.frame = CGRectMake(floorf(logoWidth * .75), startButton.frame.size.height / 2 - activityIndicatorView.frame.size.height/2, self.activityIndicatorView.frame.size.width, self.activityIndicatorView.frame.size.height);

Expand Down
2 changes: 1 addition & 1 deletion OpenWatch/OWShareViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ - (id)init

[self.navigationItem setHidesBackButton:YES animated:NO];

self.skipButton = [[UIBarButtonItem alloc] initWithTitle:@"Skip" style:UIBarButtonItemStyleBordered target:self action:@selector(skipButtonPressed:)];
self.skipButton = [[UIBarButtonItem alloc] initWithTitle:@"Finish" style:UIBarButtonItemStyleBordered target:self action:@selector(skipButtonPressed:)];
self.navigationItem.rightBarButtonItem = skipButton;

[self.view addSubview:shareButton];
Expand Down

0 comments on commit 5d2f950

Please sign in to comment.