4
This commit is contained in:
@@ -31,6 +31,8 @@
|
|||||||
"No token returned" = "No token returned";
|
"No token returned" = "No token returned";
|
||||||
"Failed to save login state" = "Failed to save login state";
|
"Failed to save login state" = "Failed to save login state";
|
||||||
"请切换到主App完成登录" = "Please switch to the main app to finish signing in";
|
"请切换到主App完成登录" = "Please switch to the main app to finish signing in";
|
||||||
|
"Continue Via Email" = "Continue Via Email";
|
||||||
|
|
||||||
|
|
||||||
// Language switching prompt
|
// Language switching prompt
|
||||||
"Change Language" = "Change Language";
|
"Change Language" = "Change Language";
|
||||||
|
|||||||
@@ -31,6 +31,8 @@
|
|||||||
"No token returned" = "未返回 token";
|
"No token returned" = "未返回 token";
|
||||||
"Failed to save login state" = "保存登录态失败";
|
"Failed to save login state" = "保存登录态失败";
|
||||||
"请切换到主App完成登录" = "请切换到主App完成登录";
|
"请切换到主App完成登录" = "请切换到主App完成登录";
|
||||||
|
"Continue Via Email" = "通过邮箱登录";
|
||||||
|
|
||||||
|
|
||||||
// 语言切换提示
|
// 语言切换提示
|
||||||
"Change Language" = "切换语言";
|
"Change Language" = "切换语言";
|
||||||
|
|||||||
@@ -101,6 +101,7 @@
|
|||||||
0498BD622EDFFC12006CC1D5 /* KBMyVM.m in Sources */ = {isa = PBXBuildFile; fileRef = 0498BD612EDFFC12006CC1D5 /* KBMyVM.m */; };
|
0498BD622EDFFC12006CC1D5 /* KBMyVM.m in Sources */ = {isa = PBXBuildFile; fileRef = 0498BD612EDFFC12006CC1D5 /* KBMyVM.m */; };
|
||||||
0498BD652EE0116D006CC1D5 /* KBEmailLoginVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 0498BD642EE0116D006CC1D5 /* KBEmailLoginVC.m */; };
|
0498BD652EE0116D006CC1D5 /* KBEmailLoginVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 0498BD642EE0116D006CC1D5 /* KBEmailLoginVC.m */; };
|
||||||
0498BD682EE01180006CC1D5 /* KBEmailRegistVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 0498BD672EE01180006CC1D5 /* KBEmailRegistVC.m */; };
|
0498BD682EE01180006CC1D5 /* KBEmailRegistVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 0498BD672EE01180006CC1D5 /* KBEmailRegistVC.m */; };
|
||||||
|
0498BD6B2EE025FC006CC1D5 /* KBForgetPwdVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 0498BD6A2EE025FC006CC1D5 /* KBForgetPwdVC.m */; };
|
||||||
049FB20B2EC1C13800FAB05D /* KBSkinBottomActionView.m in Sources */ = {isa = PBXBuildFile; fileRef = 049FB20A2EC1C13800FAB05D /* KBSkinBottomActionView.m */; };
|
049FB20B2EC1C13800FAB05D /* KBSkinBottomActionView.m in Sources */ = {isa = PBXBuildFile; fileRef = 049FB20A2EC1C13800FAB05D /* KBSkinBottomActionView.m */; };
|
||||||
049FB20E2EC1CD2800FAB05D /* KBAlert.m in Sources */ = {isa = PBXBuildFile; fileRef = 049FB20D2EC1CD2800FAB05D /* KBAlert.m */; };
|
049FB20E2EC1CD2800FAB05D /* KBAlert.m in Sources */ = {isa = PBXBuildFile; fileRef = 049FB20D2EC1CD2800FAB05D /* KBAlert.m */; };
|
||||||
049FB2112EC1F72F00FAB05D /* KBMyListCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 049FB2102EC1F72F00FAB05D /* KBMyListCell.m */; };
|
049FB2112EC1F72F00FAB05D /* KBMyListCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 049FB2102EC1F72F00FAB05D /* KBMyListCell.m */; };
|
||||||
@@ -373,6 +374,8 @@
|
|||||||
0498BD642EE0116D006CC1D5 /* KBEmailLoginVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KBEmailLoginVC.m; sourceTree = "<group>"; };
|
0498BD642EE0116D006CC1D5 /* KBEmailLoginVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KBEmailLoginVC.m; sourceTree = "<group>"; };
|
||||||
0498BD662EE01180006CC1D5 /* KBEmailRegistVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KBEmailRegistVC.h; sourceTree = "<group>"; };
|
0498BD662EE01180006CC1D5 /* KBEmailRegistVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KBEmailRegistVC.h; sourceTree = "<group>"; };
|
||||||
0498BD672EE01180006CC1D5 /* KBEmailRegistVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KBEmailRegistVC.m; sourceTree = "<group>"; };
|
0498BD672EE01180006CC1D5 /* KBEmailRegistVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KBEmailRegistVC.m; sourceTree = "<group>"; };
|
||||||
|
0498BD692EE025FC006CC1D5 /* KBForgetPwdVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KBForgetPwdVC.h; sourceTree = "<group>"; };
|
||||||
|
0498BD6A2EE025FC006CC1D5 /* KBForgetPwdVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KBForgetPwdVC.m; sourceTree = "<group>"; };
|
||||||
049FB2092EC1C13800FAB05D /* KBSkinBottomActionView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KBSkinBottomActionView.h; sourceTree = "<group>"; };
|
049FB2092EC1C13800FAB05D /* KBSkinBottomActionView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KBSkinBottomActionView.h; sourceTree = "<group>"; };
|
||||||
049FB20A2EC1C13800FAB05D /* KBSkinBottomActionView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KBSkinBottomActionView.m; sourceTree = "<group>"; };
|
049FB20A2EC1C13800FAB05D /* KBSkinBottomActionView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KBSkinBottomActionView.m; sourceTree = "<group>"; };
|
||||||
049FB20C2EC1CD2800FAB05D /* KBAlert.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KBAlert.h; sourceTree = "<group>"; };
|
049FB20C2EC1CD2800FAB05D /* KBAlert.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KBAlert.h; sourceTree = "<group>"; };
|
||||||
@@ -1330,6 +1333,8 @@
|
|||||||
0498BD672EE01180006CC1D5 /* KBEmailRegistVC.m */,
|
0498BD672EE01180006CC1D5 /* KBEmailRegistVC.m */,
|
||||||
0498BD632EE0116D006CC1D5 /* KBEmailLoginVC.h */,
|
0498BD632EE0116D006CC1D5 /* KBEmailLoginVC.h */,
|
||||||
0498BD642EE0116D006CC1D5 /* KBEmailLoginVC.m */,
|
0498BD642EE0116D006CC1D5 /* KBEmailLoginVC.m */,
|
||||||
|
0498BD692EE025FC006CC1D5 /* KBForgetPwdVC.h */,
|
||||||
|
0498BD6A2EE025FC006CC1D5 /* KBForgetPwdVC.m */,
|
||||||
);
|
);
|
||||||
path = VC;
|
path = VC;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@@ -1741,6 +1746,7 @@
|
|||||||
04FC97092EB31B14007BD342 /* KBHUD.m in Sources */,
|
04FC97092EB31B14007BD342 /* KBHUD.m in Sources */,
|
||||||
04FC970E2EB334F8007BD342 /* UIImageView+KBWebImage.m in Sources */,
|
04FC970E2EB334F8007BD342 /* UIImageView+KBWebImage.m in Sources */,
|
||||||
049FB2232EC311F900FAB05D /* KBPersonInfoVC.m in Sources */,
|
049FB2232EC311F900FAB05D /* KBPersonInfoVC.m in Sources */,
|
||||||
|
0498BD6B2EE025FC006CC1D5 /* KBForgetPwdVC.m in Sources */,
|
||||||
048908FE2EC0CC2400FABA60 /* UIScrollView+KBEmptyView.m in Sources */,
|
048908FE2EC0CC2400FABA60 /* UIScrollView+KBEmptyView.m in Sources */,
|
||||||
04791F922ED48010004E8522 /* KBNoticeVC.m in Sources */,
|
04791F922ED48010004E8522 /* KBNoticeVC.m in Sources */,
|
||||||
04FC970F2EB334F8007BD342 /* KBWebImageManager.m in Sources */,
|
04FC970F2EB334F8007BD342 /* KBWebImageManager.m in Sources */,
|
||||||
|
|||||||
@@ -11,6 +11,11 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
|
|
||||||
@interface BaseNavigationController : UINavigationController
|
@interface BaseNavigationController : UINavigationController
|
||||||
|
|
||||||
|
/// Push 一个 VC,如果栈中已存在同 class 的 VC,则先移除旧的,再 push 新的。
|
||||||
|
/// 常用于类似“登录/注册”这类会互相跳转的页面,避免堆叠多个相同页面实例。
|
||||||
|
- (void)kb_pushViewControllerRemovingSameClass:(UIViewController *)viewController
|
||||||
|
animated:(BOOL)animated;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_END
|
NS_ASSUME_NONNULL_END
|
||||||
|
|||||||
@@ -41,4 +41,42 @@
|
|||||||
[super pushViewController:viewController animated:animated];
|
[super pushViewController:viewController animated:animated];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Push 一个 VC,若栈中已存在相同 class 的 VC,则先移除旧的再 push 新的。
|
||||||
|
- (void)kb_pushViewControllerRemovingSameClass:(UIViewController *)viewController
|
||||||
|
animated:(BOOL)animated {
|
||||||
|
if (!viewController) { return; }
|
||||||
|
|
||||||
|
NSMutableArray<UIViewController *> *stack = self.viewControllers.mutableCopy;
|
||||||
|
// 移除同 class 的旧 VC(通常只有一个,这里按需移除第一个)
|
||||||
|
UIViewController *toRemove = nil;
|
||||||
|
for (UIViewController *vc in stack) {
|
||||||
|
if ([vc isKindOfClass:[viewController class]]) {
|
||||||
|
toRemove = vc;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (toRemove) {
|
||||||
|
[stack removeObject:toRemove];
|
||||||
|
}
|
||||||
|
|
||||||
|
// 追加新 VC
|
||||||
|
[stack addObject:viewController];
|
||||||
|
|
||||||
|
// 对前一个 VC 做统一的返回按钮样式处理,与 pushViewController: 保持一致
|
||||||
|
if (stack.count > 1) {
|
||||||
|
viewController.hidesBottomBarWhenPushed = YES;
|
||||||
|
UIViewController *prev = stack[stack.count - 2];
|
||||||
|
if (@available(iOS 14.0, *)) {
|
||||||
|
prev.navigationItem.backButtonDisplayMode = UINavigationItemBackButtonDisplayModeMinimal;
|
||||||
|
} else {
|
||||||
|
prev.navigationItem.backBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@""
|
||||||
|
style:UIBarButtonItemStylePlain
|
||||||
|
target:nil
|
||||||
|
action:nil];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[self setViewControllers:stack animated:animated];
|
||||||
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#import "KBEmailLoginVC.h"
|
#import "KBEmailLoginVC.h"
|
||||||
|
#import "KBEmailRegistVC.h"
|
||||||
|
|
||||||
@interface KBEmailLoginVC () <UITextViewDelegate, UITextFieldDelegate>
|
@interface KBEmailLoginVC () <UITextViewDelegate, UITextFieldDelegate>
|
||||||
|
|
||||||
@@ -225,6 +226,13 @@
|
|||||||
|
|
||||||
- (void)onTapSignUp {
|
- (void)onTapSignUp {
|
||||||
KBLOG(@"KBEmailLoginVC onTapSignUp");
|
KBLOG(@"KBEmailLoginVC onTapSignUp");
|
||||||
|
KBEmailRegistVC *vc = [[KBEmailRegistVC alloc] init];
|
||||||
|
UINavigationController *nav = KB_CURRENT_NAV;
|
||||||
|
if ([nav isKindOfClass:[BaseNavigationController class]]) {
|
||||||
|
[(BaseNavigationController *)nav kb_pushViewControllerRemovingSameClass:vc animated:YES];
|
||||||
|
} else {
|
||||||
|
[nav pushViewController:vc animated:YES];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)onTapTogglePassword:(UIButton *)sender {
|
- (void)onTapTogglePassword:(UIButton *)sender {
|
||||||
|
|||||||
@@ -324,8 +324,12 @@
|
|||||||
- (void)onTapEmailLogin {
|
- (void)onTapEmailLogin {
|
||||||
KBLOG(@"onTapEmailLogin in KBEmailRegistVC");
|
KBLOG(@"onTapEmailLogin in KBEmailRegistVC");
|
||||||
KBEmailLoginVC *vc = [[KBEmailLoginVC alloc] init];
|
KBEmailLoginVC *vc = [[KBEmailLoginVC alloc] init];
|
||||||
[KB_CURRENT_NAV pushViewController:vc animated:true];
|
UINavigationController *nav = KB_CURRENT_NAV;
|
||||||
|
if ([nav isKindOfClass:[BaseNavigationController class]]) {
|
||||||
|
[(BaseNavigationController *)nav kb_pushViewControllerRemovingSameClass:vc animated:YES];
|
||||||
|
} else {
|
||||||
|
[nav pushViewController:vc animated:YES];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark - Agreement Tap
|
#pragma mark - Agreement Tap
|
||||||
|
|||||||
16
keyBoard/Class/Login/VC/KBForgetPwdVC.h
Normal file
16
keyBoard/Class/Login/VC/KBForgetPwdVC.h
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
//
|
||||||
|
// KBForgetPwdVC.h
|
||||||
|
// keyBoard
|
||||||
|
//
|
||||||
|
// Created by Mac on 2025/12/3.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@interface KBForgetPwdVC : UIViewController
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
31
keyBoard/Class/Login/VC/KBForgetPwdVC.m
Normal file
31
keyBoard/Class/Login/VC/KBForgetPwdVC.m
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
//
|
||||||
|
// KBForgetPwdVC.m
|
||||||
|
// keyBoard
|
||||||
|
//
|
||||||
|
// Created by Mac on 2025/12/3.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "KBForgetPwdVC.h"
|
||||||
|
|
||||||
|
@interface KBForgetPwdVC ()
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
@implementation KBForgetPwdVC
|
||||||
|
|
||||||
|
- (void)viewDidLoad {
|
||||||
|
[super viewDidLoad];
|
||||||
|
// Do any additional setup after loading the view.
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
#pragma mark - Navigation
|
||||||
|
|
||||||
|
// In a storyboard-based application, you will often want to do a little preparation before navigation
|
||||||
|
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
|
||||||
|
// Get the new view controller using [segue destinationViewController].
|
||||||
|
// Pass the selected object to the new view controller.
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
@end
|
||||||
@@ -190,7 +190,12 @@
|
|||||||
// 后续接入邮箱登录逻辑
|
// 后续接入邮箱登录逻辑
|
||||||
KBLOG(@"onTapEmailLogin");
|
KBLOG(@"onTapEmailLogin");
|
||||||
KBEmailLoginVC *vc = [[KBEmailLoginVC alloc] init];
|
KBEmailLoginVC *vc = [[KBEmailLoginVC alloc] init];
|
||||||
[KB_CURRENT_NAV pushViewController:vc animated:true];
|
UINavigationController *nav = KB_CURRENT_NAV;
|
||||||
|
if ([nav isKindOfClass:[BaseNavigationController class]]) {
|
||||||
|
[(BaseNavigationController *)nav kb_pushViewControllerRemovingSameClass:vc animated:YES];
|
||||||
|
} else {
|
||||||
|
[nav pushViewController:vc animated:YES];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)onTapPolicy {
|
- (void)onTapPolicy {
|
||||||
@@ -202,7 +207,12 @@
|
|||||||
// 打开注册页
|
// 打开注册页
|
||||||
KBLOG(@"onTapSignUp");
|
KBLOG(@"onTapSignUp");
|
||||||
KBEmailRegistVC *vc = [[KBEmailRegistVC alloc] init];
|
KBEmailRegistVC *vc = [[KBEmailRegistVC alloc] init];
|
||||||
[KB_CURRENT_NAV pushViewController:vc animated:true];
|
UINavigationController *nav = KB_CURRENT_NAV;
|
||||||
|
if ([nav isKindOfClass:[BaseNavigationController class]]) {
|
||||||
|
[(BaseNavigationController *)nav kb_pushViewControllerRemovingSameClass:vc animated:YES];
|
||||||
|
} else {
|
||||||
|
[nav pushViewController:vc animated:YES];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)onTapForgotPassword {
|
- (void)onTapForgotPassword {
|
||||||
|
|||||||
Reference in New Issue
Block a user