Skip to content

Commit 5a1c991

Browse files
committed
Return proper top offset to demo for iOS 6, and don't try to set tintColor
1 parent fbc0e23 commit 5a1c991

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

JVFloatLabeledTextField/JVFloatLabeledTextFieldViewController.m

+5-1
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,13 @@ - (void)viewDidLoad
5656
[super viewDidLoad];
5757
// Do any additional setup after loading the view.
5858

59+
CGFloat topOffset = 0;
60+
61+
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000
5962
[self.view setTintColor:[UIColor blueColor]];
6063

61-
CGFloat topOffset = [[UIApplication sharedApplication] statusBarFrame].size.height + self.navigationController.navigationBar.frame.size.height;
64+
topOffset = [[UIApplication sharedApplication] statusBarFrame].size.height + self.navigationController.navigationBar.frame.size.height;
65+
#endif
6266

6367
UIColor *floatingLabelColor = [UIColor grayColor];
6468

0 commit comments

Comments
 (0)