添加渐变色

This commit is contained in:
2026-01-16 21:37:18 +08:00
parent 552387293c
commit 063ceae10f
7 changed files with 342 additions and 152 deletions

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 315 KiB

View File

@@ -21,6 +21,10 @@
@property(nonatomic, strong) UILabel *statusLabel; @property(nonatomic, strong) UILabel *statusLabel;
@property(nonatomic, strong) UIButton *commentButton; @property(nonatomic, strong) UIButton *commentButton;
@property(nonatomic, strong) KBAICommentView *commentView; @property(nonatomic, strong) KBAICommentView *commentView;
@property(nonatomic, strong) UIView *tabbarBackgroundView;
@property(nonatomic, strong) UIVisualEffectView *blurEffectView;
@property(nonatomic, strong) CAGradientLayer *gradientLayer;
@property(nonatomic, strong) UIImageView *personImageView;
// //
@property(nonatomic, strong) ConversationOrchestrator *orchestrator; @property(nonatomic, strong) ConversationOrchestrator *orchestrator;
@@ -34,6 +38,10 @@
- (void)viewDidLoad { - (void)viewDidLoad {
[super viewDidLoad]; [super viewDidLoad];
//
self.edgesForExtendedLayout = UIRectEdgeAll;
self.extendedLayoutIncludesOpaqueBars = YES;
[self setupUI]; [self setupUI];
[self setupOrchestrator]; [self setupOrchestrator];
} }
@@ -45,6 +53,54 @@
[self.orchestrator stop]; [self.orchestrator stop];
} }
- (void)viewDidLayoutSubviews {
[super viewDidLayoutSubviews];
//
if (!self.gradientLayer) {
self.gradientLayer = [CAGradientLayer layer];
self.gradientLayer.startPoint = CGPointMake(0.53, 1); //
self.gradientLayer.endPoint = CGPointMake(0.54, 0); //
// 24%
self.gradientLayer.colors = @[
(__bridge id)[UIColor colorWithRed:0 / 255.0
green:0 / 255.0
blue:0 / 255.0
alpha:0.24]
.CGColor,
(__bridge id)[UIColor colorWithRed:3 / 255.0
green:3 / 255.0
blue:3 / 255.0
alpha:0]
.CGColor
];
self.gradientLayer.locations = @[ @(0.7), @(1.0) ];
[self.tabbarBackgroundView.layer addSublayer:self.gradientLayer];
}
// frame
self.gradientLayer.frame = self.tabbarBackgroundView.bounds;
// blurEffectView
// mask
if (!self.blurEffectView.layer.mask) {
CAGradientLayer *maskLayer = [CAGradientLayer layer];
maskLayer.startPoint = CGPointMake(0.5, 1); //
maskLayer.endPoint = CGPointMake(0.5, 0); //
//
maskLayer.colors = @[
(__bridge id)[UIColor whiteColor].CGColor, //
(__bridge id)[UIColor whiteColor].CGColor, //
(__bridge id)[UIColor clearColor].CGColor //
];
maskLayer.locations = @[ @(0.0), @(0.5), @(1.0) ];
self.blurEffectView.layer.mask = maskLayer;
}
// mask frame
self.blurEffectView.layer.mask.frame = self.blurEffectView.bounds;
}
#pragma mark - UI Setup #pragma mark - UI Setup
- (void)setupUI { - (void)setupUI {
@@ -54,6 +110,29 @@
// //
UILayoutGuide *safeArea = self.view.safeAreaLayoutGuide; UILayoutGuide *safeArea = self.view.safeAreaLayoutGuide;
// PersonImageView
self.personImageView =
[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"person_icon"]];
[self.view addSubview:self.personImageView];
[self.personImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.top.bottom.equalTo(self.view);
}];
// TabBar personImageView
self.tabbarBackgroundView = [[UIView alloc] init];
self.tabbarBackgroundView.translatesAutoresizingMaskIntoConstraints = NO;
self.tabbarBackgroundView.clipsToBounds = YES;
[self.view addSubview:self.tabbarBackgroundView];
//
UIBlurEffect *blurEffect =
[UIBlurEffect effectWithStyle:UIBlurEffectStyleLight];
self.blurEffectView = [[UIVisualEffectView alloc] initWithEffect:blurEffect];
self.blurEffectView.translatesAutoresizingMaskIntoConstraints = NO;
[self.tabbarBackgroundView addSubview:self.blurEffectView];
// viewDidLayoutSubviews
// //
self.statusLabel = [[UILabel alloc] init]; self.statusLabel = [[UILabel alloc] init];
self.statusLabel.text = @"按住按钮开始对话"; self.statusLabel.text = @"按住按钮开始对话";
@@ -64,10 +143,10 @@
[self.view addSubview:self.statusLabel]; [self.view addSubview:self.statusLabel];
// //
self.chatView = [[KBAiChatView alloc] init]; // self.chatView = [[KBAiChatView alloc] init];
self.chatView.backgroundColor = [UIColor systemBackgroundColor]; // self.chatView.backgroundColor = [UIColor systemBackgroundColor];
self.chatView.translatesAutoresizingMaskIntoConstraints = NO; // self.chatView.translatesAutoresizingMaskIntoConstraints = NO;
[self.view addSubview:self.chatView]; // [self.view addSubview:self.chatView];
// //
self.recordButton = [[KBAiRecordButton alloc] init]; self.recordButton = [[KBAiRecordButton alloc] init];
@@ -92,51 +171,34 @@
forControlEvents:UIControlEventTouchUpInside]; forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:self.commentButton]; [self.view addSubview:self.commentButton];
// // - 使 Masonry
[NSLayoutConstraint activateConstraints:@[ [self.tabbarBackgroundView mas_makeConstraints:^(MASConstraintMaker *make) {
// make.left.right.bottom.equalTo(self.view);
[self.statusLabel.topAnchor constraintEqualToAnchor:safeArea.topAnchor make.height.mas_equalTo(KBFit(238));
constant:8], }];
[self.statusLabel.leadingAnchor
constraintEqualToAnchor:safeArea.leadingAnchor
constant:16],
[self.statusLabel.trailingAnchor
constraintEqualToAnchor:safeArea.trailingAnchor
constant:-16],
// [self.blurEffectView mas_makeConstraints:^(MASConstraintMaker *make) {
[self.chatView.topAnchor make.edges.equalTo(self.tabbarBackgroundView);
constraintEqualToAnchor:self.statusLabel.bottomAnchor }];
constant:8],
[self.chatView.leadingAnchor
constraintEqualToAnchor:safeArea.leadingAnchor],
[self.chatView.trailingAnchor
constraintEqualToAnchor:safeArea.trailingAnchor],
[self.chatView.bottomAnchor
constraintEqualToAnchor:self.recordButton.topAnchor
constant:-16],
// [self.statusLabel mas_makeConstraints:^(MASConstraintMaker *make) {
[self.recordButton.leadingAnchor make.top.equalTo(self.view.mas_safeAreaLayoutGuideTop).offset(8);
constraintEqualToAnchor:safeArea.leadingAnchor make.left.equalTo(self.view).offset(16);
constant:20], make.right.equalTo(self.view).offset(-16);
[self.recordButton.trailingAnchor }];
constraintEqualToAnchor:safeArea.trailingAnchor
constant:-20],
[self.recordButton.bottomAnchor
constraintEqualToAnchor:safeArea.bottomAnchor
constant:-16],
[self.recordButton.heightAnchor constraintEqualToConstant:50],
// [self.recordButton mas_makeConstraints:^(MASConstraintMaker *make) {
[self.commentButton.trailingAnchor make.left.equalTo(self.view.mas_safeAreaLayoutGuideLeft).offset(20);
constraintEqualToAnchor:safeArea.trailingAnchor make.right.equalTo(self.view.mas_safeAreaLayoutGuideRight).offset(-20);
constant:-16], make.bottom.equalTo(self.view.mas_safeAreaLayoutGuideBottom).offset(-16);
[self.commentButton.centerYAnchor make.height.mas_equalTo(50);
constraintEqualToAnchor:self.chatView.centerYAnchor], }];
[self.commentButton.widthAnchor constraintEqualToConstant:50],
[self.commentButton.heightAnchor constraintEqualToConstant:50], [self.commentButton mas_makeConstraints:^(MASConstraintMaker *make) {
]]; make.right.equalTo(self.view.mas_safeAreaLayoutGuideRight).offset(-16);
make.centerY.equalTo(self.view);
make.width.height.mas_equalTo(50);
}];
} }
#pragma mark - Orchestrator Setup #pragma mark - Orchestrator Setup
@@ -240,25 +302,25 @@
#pragma mark - #pragma mark -
- (void)showComment { - (void)showComment {
CGFloat customViewHeight = KB_SCREEN_HEIGHT * (0.8); CGFloat customViewHeight = KB_SCREEN_HEIGHT * (0.8);
KBAICommentView *customView = [[KBAICommentView alloc] KBAICommentView *customView = [[KBAICommentView alloc]
initWithFrame:CGRectMake(0, 0, KB_SCREEN_WIDTH, customViewHeight)]; initWithFrame:CGRectMake(0, 0, KB_SCREEN_WIDTH, customViewHeight)];
LSTPopView *popView = LSTPopView *popView =
[LSTPopView initWithCustomView:customView [LSTPopView initWithCustomView:customView
parentView:nil parentView:nil
popStyle:LSTPopStyleSmoothFromBottom popStyle:LSTPopStyleSmoothFromBottom
dismissStyle:LSTDismissStyleSmoothToBottom]; dismissStyle:LSTDismissStyleSmoothToBottom];
self.popView = popView; self.popView = popView;
popView.priority = 1000; popView.priority = 1000;
popView.isAvoidKeyboard = false; popView.isAvoidKeyboard = false;
popView.hemStyle = LSTHemStyleBottom; popView.hemStyle = LSTHemStyleBottom;
popView.dragStyle = LSTDragStyleY_Positive; popView.dragStyle = LSTDragStyleY_Positive;
popView.dragDistance = customViewHeight * 0.5; popView.dragDistance = customViewHeight * 0.5;
popView.sweepStyle = LSTSweepStyleY_Positive; popView.sweepStyle = LSTSweepStyleY_Positive;
popView.swipeVelocity = 1600; popView.swipeVelocity = 1600;
popView.sweepDismissStyle = LSTSweepDismissStyleSmooth; popView.sweepDismissStyle = LSTSweepDismissStyleSmooth;
[popView pop]; [popView pop];
} }
- (void)showCommentDirectly { - (void)showCommentDirectly {
@@ -268,12 +330,14 @@
} }
CGFloat customViewHeight = KB_SCREEN_HEIGHT * (0.8); CGFloat customViewHeight = KB_SCREEN_HEIGHT * (0.8);
KBAICommentView *customView = [[KBAICommentView alloc] initWithFrame:CGRectZero]; KBAICommentView *customView =
[[KBAICommentView alloc] initWithFrame:CGRectZero];
customView.translatesAutoresizingMaskIntoConstraints = NO; customView.translatesAutoresizingMaskIntoConstraints = NO;
[self.view addSubview:customView]; [self.view addSubview:customView];
[NSLayoutConstraint activateConstraints:@[ [NSLayoutConstraint activateConstraints:@[
[customView.leadingAnchor constraintEqualToAnchor:self.view.leadingAnchor], [customView.leadingAnchor constraintEqualToAnchor:self.view.leadingAnchor],
[customView.trailingAnchor constraintEqualToAnchor:self.view.trailingAnchor], [customView.trailingAnchor
constraintEqualToAnchor:self.view.trailingAnchor],
[customView.bottomAnchor constraintEqualToAnchor:self.view.bottomAnchor], [customView.bottomAnchor constraintEqualToAnchor:self.view.bottomAnchor],
[customView.heightAnchor constraintEqualToConstant:customViewHeight], [customView.heightAnchor constraintEqualToConstant:customViewHeight],
]]; ]];

View File

@@ -7,132 +7,215 @@
#import "BaseTabBarController.h" #import "BaseTabBarController.h"
#import "HomeMainVC.h" #import "HomeMainVC.h"
#import "MyVC.h"
#import "KBShopVC.h"
#import "KBAiMainVC.h" #import "KBAiMainVC.h"
#import "KBShopVC.h"
#import "MyVC.h"
//#import "KBCommunityVC.h" // #import "KBCommunityVC.h"
#import "BaseNavigationController.h" #import "BaseNavigationController.h"
#import "KBAuthManager.h" #import "KBAuthManager.h"
@interface BaseTabBarController () @interface BaseTabBarController ()
/// TabBar appearance
@property(nonatomic, strong)
UITabBarAppearance *originalAppearance API_AVAILABLE(ios(13.0));
@property(nonatomic, strong)
UITabBarAppearance *transparentAppearance API_AVAILABLE(ios(13.0));
@end @end
@implementation BaseTabBarController @implementation BaseTabBarController
- (void)viewDidLoad { - (void)viewDidLoad {
[super viewDidLoad]; [super viewDidLoad];
self.delegate = self; self.delegate = self;
[self setupTabbarAppearance]; [self setupTabbarAppearance];
// 4 Tab / / / // 4 Tab / / /
// Assets.xcassets/Tabbar tab_home/tab_home_selected // Assets.xcassets/Tabbar tab_home/tab_home_selected
// //
HomeMainVC *home = [[HomeMainVC alloc] init]; HomeMainVC *home = [[HomeMainVC alloc] init];
BaseNavigationController *navHome = [[BaseNavigationController alloc] initWithRootViewController:home]; BaseNavigationController *navHome =
navHome.tabBarItem = [self tabItemWithTitle:KBLocalized(@"Home") [[BaseNavigationController alloc] initWithRootViewController:home];
navHome.tabBarItem = [self tabItemWithTitle:KBLocalized(@"Home")
image:@"tab_home" image:@"tab_home"
selectedImg:@"tab_home_selected"]; selectedImg:@"tab_home_selected"];
// //
KBShopVC *shop = [[KBShopVC alloc] init]; KBShopVC *shop = [[KBShopVC alloc] init];
BaseNavigationController *navShop = [[BaseNavigationController alloc] initWithRootViewController:shop]; BaseNavigationController *navShop =
navShop.tabBarItem = [self tabItemWithTitle:KBLocalized(@"Shop") [[BaseNavigationController alloc] initWithRootViewController:shop];
navShop.tabBarItem = [self tabItemWithTitle:KBLocalized(@"Shop")
image:@"tab_shop" image:@"tab_shop"
selectedImg:@"tab_shop_selected"]; selectedImg:@"tab_shop_selected"];
// AI // AI
KBAiMainVC *aiMainVC = [[KBAiMainVC alloc] init]; KBAiMainVC *aiMainVC = [[KBAiMainVC alloc] init];
// community.title = KBLocalized(@"Circle"); // community.title = KBLocalized(@"Circle");
BaseNavigationController *navCommunity = [[BaseNavigationController alloc] initWithRootViewController:aiMainVC]; BaseNavigationController *navCommunity =
navCommunity.tabBarItem = [self tabItemWithTitle:KBLocalized(@"Circle") [[BaseNavigationController alloc] initWithRootViewController:aiMainVC];
navCommunity.tabBarItem = [self tabItemWithTitle:KBLocalized(@"Circle")
image:@"tab_shequ" image:@"tab_shequ"
selectedImg:@"tab_shequ_selected"]; selectedImg:@"tab_shequ_selected"];
// //
MyVC *my = [[MyVC alloc] init]; MyVC *my = [[MyVC alloc] init];
BaseNavigationController *navMy = [[BaseNavigationController alloc] initWithRootViewController:my]; BaseNavigationController *navMy =
navMy.tabBarItem = [self tabItemWithTitle:KBLocalized(@"Mine") [[BaseNavigationController alloc] initWithRootViewController:my];
image:@"tab_my" navMy.tabBarItem = [self tabItemWithTitle:KBLocalized(@"Mine")
selectedImg:@"tab_my_selected"]; image:@"tab_my"
selectedImg:@"tab_my_selected"];
self.viewControllers = @[aiMainVC,navHome, navShop, navMy]; self.viewControllers = @[ navHome, navShop, aiMainVC, navMy ];
// Token // Token
// [[KBAuthManager shared] saveAccessToken:@"TEST" refreshToken:nil expiryDate:[NSDate dateWithTimeIntervalSinceNow:3600] userIdentifier:nil]; // [[KBAuthManager shared] saveAccessToken:@"TEST" refreshToken:nil
// [[KBAuthManager shared] signOut]; // expiryDate:[NSDate dateWithTimeIntervalSinceNow:3600]
// userIdentifier:nil];
// [[KBAuthManager shared] signOut];
} }
- (void)setupTabbarAppearance{ - (void)setupTabbarAppearance {
// TabBar view TabBar // TabBar view TabBar
self.tabBar.translucent = NO; self.tabBar.translucent = NO;
if (@available(iOS 15.0, *)) { if (@available(iOS 15.0, *)) {
UITabBarAppearance *a = [UITabBarAppearance new]; UITabBarAppearance *a = [UITabBarAppearance new];
[a configureWithOpaqueBackground]; [a configureWithOpaqueBackground];
a.backgroundColor = [UIColor whiteColor]; a.backgroundColor = [UIColor whiteColor];
// iOS 15+ appearance // iOS 15+ appearance
NSDictionary *selAttr = @{ NSForegroundColorAttributeName : [UIColor blackColor] }; NSDictionary *selAttr =
a.stackedLayoutAppearance.selected.titleTextAttributes = selAttr; @{NSForegroundColorAttributeName : [UIColor blackColor]};
a.inlineLayoutAppearance.selected.titleTextAttributes = selAttr; a.stackedLayoutAppearance.selected.titleTextAttributes = selAttr;
a.compactInlineLayoutAppearance.selected.titleTextAttributes = selAttr; a.inlineLayoutAppearance.selected.titleTextAttributes = selAttr;
self.tabBar.standardAppearance = a; a.compactInlineLayoutAppearance.selected.titleTextAttributes = selAttr;
self.tabBar.scrollEdgeAppearance = a; self.tabBar.standardAppearance = a;
} else if (@available(iOS 13.0, *)) { self.tabBar.scrollEdgeAppearance = a;
UITabBarAppearance *a = [UITabBarAppearance new];
[a configureWithOpaqueBackground]; // appearance
a.backgroundColor = [UIColor whiteColor]; self.originalAppearance = a;
NSDictionary *selAttr = @{ NSForegroundColorAttributeName : [UIColor blackColor] };
a.stackedLayoutAppearance.selected.titleTextAttributes = selAttr; // appearance
a.inlineLayoutAppearance.selected.titleTextAttributes = selAttr; UITabBarAppearance *transparentA = [UITabBarAppearance new];
a.compactInlineLayoutAppearance.selected.titleTextAttributes = selAttr; [transparentA configureWithTransparentBackground];
self.tabBar.standardAppearance = a; transparentA.backgroundColor = [UIColor clearColor];
self.tabBar.tintColor = [UIColor blackColor]; transparentA.stackedLayoutAppearance.selected.titleTextAttributes = selAttr;
} else { transparentA.inlineLayoutAppearance.selected.titleTextAttributes = selAttr;
// tintColor/appearance 退 transparentA.compactInlineLayoutAppearance.selected.titleTextAttributes =
self.tabBar.tintColor = [UIColor blackColor]; selAttr;
[[UITabBarItem appearance] setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor blackColor]} self.transparentAppearance = transparentA;
forState:UIControlStateSelected]; } else if (@available(iOS 13.0, *)) {
} UITabBarAppearance *a = [UITabBarAppearance new];
[a configureWithOpaqueBackground];
a.backgroundColor = [UIColor whiteColor];
NSDictionary *selAttr =
@{NSForegroundColorAttributeName : [UIColor blackColor]};
a.stackedLayoutAppearance.selected.titleTextAttributes = selAttr;
a.inlineLayoutAppearance.selected.titleTextAttributes = selAttr;
a.compactInlineLayoutAppearance.selected.titleTextAttributes = selAttr;
self.tabBar.standardAppearance = a;
self.tabBar.tintColor = [UIColor blackColor];
// appearance
self.originalAppearance = a;
// appearance
UITabBarAppearance *transparentA = [UITabBarAppearance new];
[transparentA configureWithTransparentBackground];
transparentA.backgroundColor = [UIColor clearColor];
transparentA.stackedLayoutAppearance.selected.titleTextAttributes = selAttr;
transparentA.inlineLayoutAppearance.selected.titleTextAttributes = selAttr;
transparentA.compactInlineLayoutAppearance.selected.titleTextAttributes =
selAttr;
self.transparentAppearance = transparentA;
} else {
// tintColor/appearance 退
self.tabBar.tintColor = [UIColor blackColor];
[[UITabBarItem appearance] setTitleTextAttributes:@{
NSForegroundColorAttributeName : [UIColor blackColor]
}
forState:UIControlStateSelected];
}
} }
// TabBarItem Tint // TabBarItem Tint
- (UITabBarItem *)tabItemWithTitle:(NSString *)title image:(NSString *)imageName selectedImg:(NSString *)selectedName { - (UITabBarItem *)tabItemWithTitle:(NSString *)title
UIImage *img = [[UIImage imageNamed:imageName] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]; image:(NSString *)imageName
UIImage *sel = [[UIImage imageNamed:selectedName] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]; selectedImg:(NSString *)selectedName {
UITabBarItem *item = [[UITabBarItem alloc] initWithTitle:title image:img selectedImage:sel]; UIImage *img = [[UIImage imageNamed:imageName]
return item; imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
UIImage *sel = [[UIImage imageNamed:selectedName]
imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
UITabBarItem *item = [[UITabBarItem alloc] initWithTitle:title
image:img
selectedImage:sel];
return item;
} }
#pragma mark - UITabBarControllerDelegate #pragma mark - UITabBarControllerDelegate
- (BOOL)tabBarController:(UITabBarController *)tabBarController shouldSelectViewController:(UIViewController *)viewController { - (BOOL)tabBarController:(UITabBarController *)tabBarController
// tab shouldSelectViewController:(UIViewController *)viewController {
if (tabBarController.selectedViewController == viewController) { // tab
return YES; if (tabBarController.selectedViewController == viewController) {
}
NSUInteger index = [tabBarController.viewControllers indexOfObject:viewController];
if (index == NSNotFound) {
return YES;
}
// tab 4 3
if ((index == 1 || index == 2) && ![KBUserSessionManager shared].isLoggedIn) {
[[KBUserSessionManager shared] goLoginVC];
return NO;
}
return YES; return YES;
}
NSUInteger index =
[tabBarController.viewControllers indexOfObject:viewController];
if (index == NSNotFound) {
return YES;
}
// tab 4 3
if ((index == 1 || index == 2) && ![KBUserSessionManager shared].isLoggedIn) {
[[KBUserSessionManager shared] goLoginVC];
return NO;
}
return YES;
}
- (void)tabBarController:(UITabBarController *)tabBarController
didSelectViewController:(UIViewController *)viewController {
NSUInteger index =
[tabBarController.viewControllers indexOfObject:viewController];
// tab2 KBAiMainVC
if (index == 2) {
if (@available(iOS 13.0, *)) {
self.tabBar.standardAppearance = self.transparentAppearance;
if (@available(iOS 15.0, *)) {
self.tabBar.scrollEdgeAppearance = self.transparentAppearance;
}
} else {
// iOS 13
self.tabBar.barTintColor = [UIColor clearColor];
self.tabBar.backgroundColor = [UIColor clearColor];
}
} else {
// tab
if (@available(iOS 13.0, *)) {
self.tabBar.standardAppearance = self.originalAppearance;
if (@available(iOS 15.0, *)) {
self.tabBar.scrollEdgeAppearance = self.originalAppearance;
}
} else {
// iOS 13
self.tabBar.barTintColor = [UIColor whiteColor];
self.tabBar.backgroundColor = [UIColor whiteColor];
}
}
} }
/* /*
#pragma mark - Navigation #pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation // In a storyboard-based application, you will often want to do a little
preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController]. // Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller. // Pass the selected object to the new view controller.