From ae4be86ecfa927f4c988d9e376d26d45ea953f4a Mon Sep 17 00:00:00 2001 From: Maarten Billemont Date: Mon, 26 Aug 2013 23:19:44 -0400 Subject: [PATCH] UI fix for iOS 7. [FIXED] New ActionSheet doesn't deal well with spacing in items. [FIXED] UI now works on iOS 7. --- .../ObjC/iOS/MPMainViewController.m | 10 +- MasterPassword/ObjC/iOS/MPiOSAppDelegate.m | 60 +- .../ObjC/iOS/MainStoryboard_iPhone.storyboard | 672 +++++++----------- .../ObjC/iOS/MasterPassword-Info.plist | 4 +- .../project.pbxproj | 21 +- 5 files changed, 310 insertions(+), 457 deletions(-) diff --git a/MasterPassword/ObjC/iOS/MPMainViewController.m b/MasterPassword/ObjC/iOS/MPMainViewController.m index 791922cf..4974a74f 100644 --- a/MasterPassword/ObjC/iOS/MPMainViewController.m +++ b/MasterPassword/ObjC/iOS/MPMainViewController.m @@ -769,11 +769,11 @@ } } cancelTitle:[PearlStrings get].commonButtonCancel destructiveTitle:nil otherTitles: - @"? FAQ ", - @"ⓘ Quick Guide ", - @"⚙ Preferences ", - @"⚐ Other Apps ", - @"✎ Feedback ", + @"FAQ", + @"Overview", + @"User Profile", + @"Other Apps", + @"Feedback", nil]; } diff --git a/MasterPassword/ObjC/iOS/MPiOSAppDelegate.m b/MasterPassword/ObjC/iOS/MPiOSAppDelegate.m index 2198755c..ae2f774d 100644 --- a/MasterPassword/ObjC/iOS/MPiOSAppDelegate.m +++ b/MasterPassword/ObjC/iOS/MPiOSAppDelegate.m @@ -139,36 +139,36 @@ } #endif - UIImage *navBarImage = [[UIImage imageNamed:@"ui_navbar_container"] resizableImageWithCapInsets:UIEdgeInsetsMake( 0, 5, 0, 5 )]; - [[UINavigationBar appearance] setBackgroundImage:navBarImage forBarMetrics:UIBarMetricsDefault]; - [[UINavigationBar appearance] setBackgroundImage:navBarImage forBarMetrics:UIBarMetricsLandscapePhone]; - [[UINavigationBar appearance] setTitleTextAttributes: - @{ - UITextAttributeTextColor : [UIColor colorWithRed:1.0f green:1.0f blue:1.0f alpha:1.0f], - UITextAttributeTextShadowColor : [UIColor colorWithRed:0.0f green:0.0f blue:0.0f alpha:0.8f], - UITextAttributeTextShadowOffset : [NSValue valueWithUIOffset:UIOffsetMake( 0, -1 )], - UITextAttributeFont : [UIFont fontWithName:@"Exo-Bold" size:20.0f] - }]; - - UIImage *navBarButton = [[UIImage imageNamed:@"ui_navbar_button"] resizableImageWithCapInsets:UIEdgeInsetsMake( 0, 5, 0, 5 )]; - UIImage *navBarBack = [[UIImage imageNamed:@"ui_navbar_back"] resizableImageWithCapInsets:UIEdgeInsetsMake( 0, 13, 0, 5 )]; - [[UIBarButtonItem appearance] setBackgroundImage:navBarButton forState:UIControlStateNormal barMetrics:UIBarMetricsDefault]; - [[UIBarButtonItem appearance] setBackgroundImage:nil forState:UIControlStateNormal barMetrics:UIBarMetricsLandscapePhone]; - [[UIBarButtonItem appearance] setBackButtonBackgroundImage:navBarBack forState:UIControlStateNormal barMetrics:UIBarMetricsDefault]; - [[UIBarButtonItem appearance] setBackButtonBackgroundImage:nil forState:UIControlStateNormal barMetrics:UIBarMetricsLandscapePhone]; - [[UIBarButtonItem appearance] setTitleTextAttributes: - @{ - UITextAttributeTextColor : [UIColor colorWithRed:1.0f green:1.0f blue:1.0f alpha:1.0f], - UITextAttributeTextShadowColor : [UIColor colorWithRed:0.0f green:0.0f blue:0.0f alpha:0.5f], - UITextAttributeTextShadowOffset : [NSValue valueWithUIOffset:UIOffsetMake( 0, 1 )]//, - // Causes a bug in iOS where image views get oddly stretched... or something. - //UITextAttributeFont: [UIFont fontWithName:@"HelveticaNeue" size:13.0f] - } - forState:UIControlStateNormal]; - - UIImage *toolBarImage = [[UIImage imageNamed:@"ui_toolbar_container"] resizableImageWithCapInsets:UIEdgeInsetsMake( 25, 5, 5, 5 )]; - [[UISearchBar appearance] setBackgroundImage:toolBarImage]; - [[UIToolbar appearance] setBackgroundImage:toolBarImage forToolbarPosition:UIToolbarPositionAny barMetrics:UIBarMetricsDefault]; +// UIImage *navBarImage = [[UIImage imageNamed:@"ui_navbar_container"] resizableImageWithCapInsets:UIEdgeInsetsMake( 0, 5, 0, 5 )]; +// [[UINavigationBar appearance] setBackgroundImage:navBarImage forBarMetrics:UIBarMetricsDefault]; +// [[UINavigationBar appearance] setBackgroundImage:navBarImage forBarMetrics:UIBarMetricsLandscapePhone]; +// [[UINavigationBar appearance] setTitleTextAttributes: +// @{ +// UITextAttributeTextColor : [UIColor colorWithRed:1.0f green:1.0f blue:1.0f alpha:1.0f], +// UITextAttributeTextShadowColor : [UIColor colorWithRed:0.0f green:0.0f blue:0.0f alpha:0.8f], +// UITextAttributeTextShadowOffset : [NSValue valueWithUIOffset:UIOffsetMake( 0, -1 )], +// UITextAttributeFont : [UIFont fontWithName:@"Exo-Bold" size:20.0f] +// }]; +// +// UIImage *navBarButton = [[UIImage imageNamed:@"ui_navbar_button"] resizableImageWithCapInsets:UIEdgeInsetsMake( 0, 5, 0, 5 )]; +// UIImage *navBarBack = [[UIImage imageNamed:@"ui_navbar_back"] resizableImageWithCapInsets:UIEdgeInsetsMake( 0, 13, 0, 5 )]; +// [[UIBarButtonItem appearance] setBackgroundImage:navBarButton forState:UIControlStateNormal barMetrics:UIBarMetricsDefault]; +// [[UIBarButtonItem appearance] setBackgroundImage:nil forState:UIControlStateNormal barMetrics:UIBarMetricsLandscapePhone]; +// [[UIBarButtonItem appearance] setBackButtonBackgroundImage:navBarBack forState:UIControlStateNormal barMetrics:UIBarMetricsDefault]; +// [[UIBarButtonItem appearance] setBackButtonBackgroundImage:nil forState:UIControlStateNormal barMetrics:UIBarMetricsLandscapePhone]; +// [[UIBarButtonItem appearance] setTitleTextAttributes: +// @{ +// UITextAttributeTextColor : [UIColor colorWithRed:1.0f green:1.0f blue:1.0f alpha:1.0f], +// UITextAttributeTextShadowColor : [UIColor colorWithRed:0.0f green:0.0f blue:0.0f alpha:0.5f], +// UITextAttributeTextShadowOffset : [NSValue valueWithUIOffset:UIOffsetMake( 0, 1 )]//, +// // Causes a bug in iOS where image views get oddly stretched... or something. +// //UITextAttributeFont: [UIFont fontWithName:@"HelveticaNeue" size:13.0f] +// } +// forState:UIControlStateNormal]; +// +// UIImage *toolBarImage = [[UIImage imageNamed:@"ui_toolbar_container"] resizableImageWithCapInsets:UIEdgeInsetsMake( 25, 5, 5, 5 )]; +// [[UISearchBar appearance] setBackgroundImage:toolBarImage]; +// [[UIToolbar appearance] setBackgroundImage:toolBarImage forToolbarPosition:UIToolbarPositionAny barMetrics:UIBarMetricsDefault]; // UIImage *minImage = [[UIImage imageNamed:@"slider-minimum"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 5, 0, 0)]; // UIImage *maxImage = [[UIImage imageNamed:@"slider-maximum"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 5, 0, 0)]; diff --git a/MasterPassword/ObjC/iOS/MainStoryboard_iPhone.storyboard b/MasterPassword/ObjC/iOS/MainStoryboard_iPhone.storyboard index 94fe5514..5616e86e 100644 --- a/MasterPassword/ObjC/iOS/MainStoryboard_iPhone.storyboard +++ b/MasterPassword/ObjC/iOS/MainStoryboard_iPhone.storyboard @@ -1,7 +1,8 @@ - + - + + @@ -23,8 +24,8 @@ - - + + - - - + + - - + + - + - - - + + @@ -96,17 +95,17 @@ - - + + - + - - - + + @@ -139,17 +137,17 @@ - - + + - + - - - + + @@ -182,17 +179,17 @@ - - + + - + - - - + + @@ -225,17 +221,17 @@ - - + + - + - - - + + @@ -268,17 +263,17 @@ - - + + - + - - - + + @@ -311,12 +305,12 @@ - - + + - - - + + @@ -338,8 +331,8 @@ It's an estimate of the amount of time necessary for a hacker with a powerful co - - + + - - - + + - - + + - + - - - + + @@ -407,17 +398,17 @@ Your passwords will be AES-encrypted with your master password. - - + + - + - - - + + @@ -443,12 +433,12 @@ Your passwords will be AES-encrypted with your master password. - - + + - - - + + @@ -518,7 +507,7 @@ Your passwords will be AES-encrypted with your master password. - + @@ -535,7 +524,7 @@ Your passwords will be AES-encrypted with your master password. - + @@ -549,6 +538,8 @@ Your passwords will be AES-encrypted with your master password. + + @@ -569,7 +560,7 @@ Your passwords will be AES-encrypted with your master password. - + @@ -726,7 +717,7 @@ Your passwords will be AES-encrypted with your master password. - + @@ -793,7 +784,7 @@ Your passwords will be AES-encrypted with your master password. - + @@ -1048,16 +1039,14 @@ L4m3P4sSw0rD - - + + - - @@ -1124,11 +1113,11 @@ L4m3P4sSw0rD - + - + + - + - + - + - + @@ -1345,7 +1335,7 @@ L4m3P4sSw0rD - @@ -1919,10 +1914,15 @@ If you set a custom password, it will be encrypted before it is saved to the clo - + + - + + + + + @@ -1938,7 +1938,7 @@ If you set a custom password, it will be encrypted before it is saved to the clo - + @@ -1957,8 +1957,8 @@ If you set a custom password, it will be encrypted before it is saved to the clo - - + + - + - + + - + @@ -2365,7 +2357,7 @@ If you set a custom password, it will be encrypted before it is saved to the clo - +