处理tabbar

This commit is contained in:
2026-01-19 19:14:20 +08:00
parent 063ceae10f
commit d1d47336c2
7 changed files with 365 additions and 218 deletions

View File

@@ -0,0 +1,32 @@
//
// KBCustomTabBar.h
// keyBoard
//
// Created by Assistant on 2026/01/16.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@class KBCustomTabBar;
@protocol KBCustomTabBarDelegate <NSObject>
- (void)customTabBar:(KBCustomTabBar *)tabBar
didSelectItemAtIndex:(NSInteger)index;
@end
@interface KBCustomTabBar : UIView
@property(nonatomic, weak) id<KBCustomTabBarDelegate> delegate;
@property(nonatomic, assign) NSInteger selectedIndex;
- (instancetype)initWithItems:(NSArray<UITabBarItem *> *)items;
- (void)setSelectedIndex:(NSInteger)selectedIndex animated:(BOOL)animated;
- (void)setTransparentBackground:(BOOL)transparent;
@end
NS_ASSUME_NONNULL_END