mirror of
https://github.com/leanote/leanote-ios.git
synced 2025-10-18 17:52:23 +00:00
zh & en logo for login
This commit is contained in:
@@ -38,7 +38,7 @@
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>138B</string>
|
||||
<string>1392</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>NSAppTransportSecurity</key>
|
||||
|
@@ -18,7 +18,7 @@
|
||||
<key>AutocorrectionType</key>
|
||||
<string>No</string>
|
||||
<key>DefaultValue</key>
|
||||
<string>1.3 (138B)</string>
|
||||
<string>1.3 (1392)</string>
|
||||
<key>IsSecure</key>
|
||||
<false/>
|
||||
<key>Key</key>
|
||||
|
@@ -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
|
||||
{
|
||||
NSAssert(self.view, @"The view should be loaded by now");
|
||||
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
|
||||
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;
|
||||
|
||||
// Add Info button
|
||||
|
22
Leanote/resources/AppImages.xcassets/leanote-icon-circle-zh.imageset/Contents.json
vendored
Normal file
22
Leanote/resources/AppImages.xcassets/leanote-icon-circle-zh.imageset/Contents.json
vendored
Normal 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"
|
||||
}
|
||||
}
|
BIN
Leanote/resources/AppImages.xcassets/leanote-icon-circle-zh.imageset/leanote-icon-circle.png
vendored
Normal file
BIN
Leanote/resources/AppImages.xcassets/leanote-icon-circle-zh.imageset/leanote-icon-circle.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.6 KiB |
BIN
Leanote/resources/AppImages.xcassets/leanote-icon-circle-zh.imageset/leanote-icon-circle@2x.png
vendored
Normal file
BIN
Leanote/resources/AppImages.xcassets/leanote-icon-circle-zh.imageset/leanote-icon-circle@2x.png
vendored
Normal file
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 |
Reference in New Issue
Block a user