Skip to content

Commit 62c4e0f

Browse files
committed
- Beautify the plus icon button experience;
- Fix the problem that the prompt language is not displayed.
1 parent 7a86cd8 commit 62c4e0f

File tree

3 files changed

+36
-6
lines changed

3 files changed

+36
-6
lines changed

SecurityNote.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1327,7 +1327,7 @@
13271327
CLANG_ENABLE_MODULES = YES;
13281328
CODE_SIGN_IDENTITY = "iPhone Developer";
13291329
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
1330-
CURRENT_PROJECT_VERSION = 2021.03.24;
1330+
CURRENT_PROJECT_VERSION = 2021.03.26;
13311331
ENABLE_BITCODE = NO;
13321332
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
13331333
GCC_PRECOMPILE_PREFIX_HEADER = YES;
@@ -1339,7 +1339,7 @@
13391339
"$(inherited)",
13401340
"$(PROJECT_DIR)/SecurityNote/Thirdparty/baidu_ios_api",
13411341
);
1342-
MARKETING_VERSION = 8.2.3;
1342+
MARKETING_VERSION = 8.3.0;
13431343
OTHER_LDFLAGS = "-ObjC";
13441344
PRODUCT_BUNDLE_IDENTIFIER = securitynote;
13451345
PRODUCT_MODULE_NAME = SecurityNote;
@@ -1360,7 +1360,7 @@
13601360
CLANG_ENABLE_MODULES = YES;
13611361
CODE_SIGN_IDENTITY = "iPhone Developer";
13621362
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
1363-
CURRENT_PROJECT_VERSION = 2021.03.24;
1363+
CURRENT_PROJECT_VERSION = 2021.03.26;
13641364
ENABLE_BITCODE = NO;
13651365
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
13661366
GCC_PRECOMPILE_PREFIX_HEADER = YES;
@@ -1372,7 +1372,7 @@
13721372
"$(inherited)",
13731373
"$(PROJECT_DIR)/SecurityNote/Thirdparty/baidu_ios_api",
13741374
);
1375-
MARKETING_VERSION = 8.2.3;
1375+
MARKETING_VERSION = 8.3.0;
13761376
OTHER_LDFLAGS = "-ObjC";
13771377
PRODUCT_BUNDLE_IDENTIFIER = securitynote;
13781378
PRODUCT_MODULE_NAME = SecurityNote;
-2.85 KB
Loading

SecurityNote/Thirdparty/MBProgressHUD/MBProgressHUD+MJ.m

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ @implementation MBProgressHUD (MJ)
1111
#pragma mark 显示信息
1212
+ (void)show:(NSString *)text icon:(NSString *)icon view:(UIView *)view
1313
{
14-
if (view == nil) view = [[UIApplication sharedApplication].windows lastObject];
14+
if (view == nil) view = [[self get_topPresentedViewController] view];
1515
// 快速显示一个提示信息
1616
MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:view animated:YES];
1717
hud.labelText = text;
@@ -27,6 +27,36 @@ + (void)show:(NSString *)text icon:(NSString *)icon view:(UIView *)view
2727
[hud hide:YES afterDelay:0.7];
2828
}
2929

30+
+ (UIViewController *)get_topPresentedViewController
31+
{
32+
UIViewController *rootVC = nil;
33+
if (@available(iOS 13.0, *)) {
34+
UIWindow *foundWindow = nil;
35+
NSArray *windows = [[UIApplication sharedApplication] windows];
36+
for (UIWindow *window in windows) {
37+
if (window.isKeyWindow) {
38+
foundWindow = window;
39+
break;
40+
}
41+
}
42+
rootVC = [foundWindow rootViewController];
43+
}
44+
else {
45+
rootVC = [UIApplication sharedApplication].keyWindow.rootViewController;
46+
}
47+
48+
if (!rootVC) {
49+
NSLog(@"find window rootViewController is nil!");
50+
rootVC = [UIApplication sharedApplication].keyWindow.rootViewController;
51+
}
52+
53+
while (rootVC.presentedViewController) {
54+
rootVC = rootVC.presentedViewController;
55+
}
56+
57+
return rootVC;
58+
}
59+
3060
#pragma mark 显示错误信息
3161
+ (void)showError:(NSString *)error toView:(UIView *)view{
3262
[self show:error icon:@"error.png" view:view];
@@ -39,7 +69,7 @@ + (void)showSuccess:(NSString *)success toView:(UIView *)view
3969

4070
#pragma mark 显示一些信息
4171
+ (MBProgressHUD *)showMessage:(NSString *)message toView:(UIView *)view {
42-
if (view == nil) view = [[UIApplication sharedApplication].windows lastObject];
72+
if (view == nil) view = [[self get_topPresentedViewController] view];
4373
// 快速显示一个提示信息
4474
MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:view animated:YES];
4575
hud.labelText = message;

0 commit comments

Comments
 (0)