调整BaseNavigationController样式

This commit is contained in:
zu
2021-09-09 19:18:47 +08:00
parent e686f32a1f
commit 9574a71282
4 changed files with 13 additions and 11 deletions

View File

@@ -18,17 +18,19 @@
[self themeConfig];
}
- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated {
viewController.navigationItem.backBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"" style:UIBarButtonItemStylePlain target:nil action:nil];
[super pushViewController:viewController animated:animated];
}
- (void)themeConfig {
self.navigationBar.shadowImage = [[UIImage alloc] init];
self.navigationBar.barTintColor = ThemeBackgroundColor;
self.navigationBar.tintColor = [UIColor whiteColor];
self.navigationBar.translucent = NO;
UIBarButtonItem *item = [[UIBarButtonItem alloc] initWithTitle:@"" style:UIBarButtonItemStylePlain target:nil action:nil];
self.navigationItem.backBarButtonItem = item;
[self.navigationBar setTitleTextAttributes:@{
NSFontAttributeName:[UIFont systemFontOfSize:18],
NSFontAttributeName:[UIFont systemFontOfSize:18 weight:UIFontWeightMedium],
NSForegroundColorAttributeName:UIColor.whiteColor
}];
}

View File

@@ -38,6 +38,7 @@
- (void)viewDidLoad {
[super viewDidLoad];
self.title = @"手机号码登录";
[self initSubViews];
[self initSubViewConstraints];
[self initEevents];
@@ -159,8 +160,8 @@
_nextButton.layer.masksToBounds = YES;
_nextButton.layer.cornerRadius = 45/2.f;
[_nextButton setTitle:@"下一步" forState:UIControlStateNormal];
_nextButton.titleLabel.font = [UIFont systemFontOfSize:15];
[_nextButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
_nextButton.titleLabel.font = [UIFont systemFontOfSize:18 weight:UIFontWeightMedium];
[_nextButton setTitleColor:UIColor.whiteColor forState:UIControlStateNormal];
_nextButton.enabled = NO;
UIImage *image = [UIImage gradientColorImageFromColors:@[ThemeButtonGradientStartColor,ThemeButtonGradientEndColor] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(10, 10)];
[_nextButton setBackgroundImage:[UIImage gradientColorImageFromColors:@[ThemeTabbarNormalColor, ThemeTabbarNormalColor] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(10, 10)] forState:UIControlStateDisabled];

View File

@@ -279,7 +279,7 @@ typedef NS_ENUM(NSInteger,XYThirdLoginType) {
if (self.agreeButton.isSelected) {
if ([view isEqual:self.phoneButtonView]) {
LoginPhoneViewController *inputPhoneVC = [[LoginPhoneViewController alloc] init];
[self.navigationController pushViewController:inputPhoneVC animated:YES];
[self.navigationController pushViewController:inputPhoneVC animated:YES];
} else if([view isEqual:self.qqButtonView]) {
[XCHUDTool showLoading];
// [GetCore(AuthCore) thirdLoginPlatform:SSDKPlatformTypeQQ];
@@ -361,6 +361,8 @@ typedef NS_ENUM(NSInteger,XYThirdLoginType) {
- (void)phoneQuickLoginFail {
[XCHUDTool showErrorWithMessage:@"一键登录失败,请检查手机网络状态。"];
LoginPhoneViewController *inputPhoneVC = [[LoginPhoneViewController alloc] init];
[self.navigationController pushViewController:inputPhoneVC animated:YES];
}
- (void)configQuickLogin {
@@ -455,8 +457,7 @@ typedef NS_ENUM(NSInteger,XYThirdLoginType) {
_loginButton.layer.masksToBounds = YES;
_loginButton.layer.cornerRadius = 45/2.f;
[_loginButton setTitle:@"本机号码一键登录" forState:UIControlStateNormal];
[_loginButton setTitle:@"本机号码一键登录" forState:UIControlStateSelected];
_loginButton.titleLabel.font = [UIFont systemFontOfSize:18 weight:UIFontWeightMedium];
_loginButton.titleLabel.font = [UIFont systemFontOfSize:18 weight:UIFontWeightMedium];
[_loginButton setTitleColor:UIColor.whiteColor forState:UIControlStateNormal];
UIImage *image = [UIImage gradientColorImageFromColors:@[ThemeButtonGradientStartColor,ThemeButtonGradientEndColor] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(KScreenWidth - 52 * 2, 45)];
[_loginButton setBackgroundImage:image forState:UIControlStateNormal];

View File

@@ -75,10 +75,8 @@
#endif
[self createTabBarItem:fvcGame title:tabLabel[0] image:normalImageNames[0] selectedImage:selectImageNames[0]];
[self addChildViewController:fvcGame];
[fvcGame.navigationController setNavigationBarHidden:YES];
BaseViewController *bvcMe = [[BaseViewController alloc] init];
[bvcMe.navigationController setNavigationBarHidden:YES];
[self createTabBarItem:bvcMe title:tabLabel[1] image:normalImageNames[1] selectedImage:selectImageNames[1]];
[self addChildViewController:bvcMe];