zh & en logo for login

This commit is contained in:
life
2016-05-23 17:06:17 +08:00
parent 1f6ec5e949
commit 0d7fa0a279
8 changed files with 41 additions and 3 deletions

View File

@@ -38,7 +38,7 @@
</dict> </dict>
</array> </array>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>138B</string> <string>1392</string>
<key>LSRequiresIPhoneOS</key> <key>LSRequiresIPhoneOS</key>
<true/> <true/>
<key>NSAppTransportSecurity</key> <key>NSAppTransportSecurity</key>

View File

@@ -18,7 +18,7 @@
<key>AutocorrectionType</key> <key>AutocorrectionType</key>
<string>No</string> <string>No</string>
<key>DefaultValue</key> <key>DefaultValue</key>
<string>1.3 (138B)</string> <string>1.3 (1392)</string>
<key>IsSecure</key> <key>IsSecure</key>
<false/> <false/>
<key>Key</key> <key>Key</key>

View File

@@ -145,14 +145,30 @@ static NSInteger const LoginVerificationCodeNumberOfLines = 2;
} }
- (NSString*)getPreferredLanguage
{
NSUserDefaults* defs = [NSUserDefaults standardUserDefaults];
NSArray* languages = [defs objectForKey:@"AppleLanguages"];
NSString* preferredLang = [languages objectAtIndex:0];
NSLog(@"Preferred Language:%@", preferredLang);
return preferredLang;
}
// //
- (void)addControls - (void)addControls
{ {
NSAssert(self.view, @"The view should be loaded by now"); NSAssert(self.view, @"The view should be loaded by now");
NSAssert(self.mainView, @"Please, initialize the mainView first"); NSAssert(self.mainView, @"Please, initialize the mainView first");
// logo
NSString *lang = [self getPreferredLanguage];
NSString *leanoteLogo = @"leanote-icon-circle";
if ([lang isEqualToString:@"zh-Hans"]) {
leanoteLogo = @"leanote-icon-circle-zh";
}
// Add Icon // Add Icon
UIImageView *icon = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"leanote-icon-circle"]]; // icon-wp UIImageView *icon = [[UIImageView alloc] initWithImage:[UIImage imageNamed:leanoteLogo]]; // icon-wp
icon.autoresizingMask = UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleLeftMargin; icon.autoresizingMask = UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleLeftMargin;
// Add Info button // Add Info button

View File

@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x",
"filename" : "leanote-icon-circle.png"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "leanote-icon-circle@2x.png"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB