2025-10-28 14:30:03 +08:00
|
|
|
|
//
|
|
|
|
|
|
// KBFunctionBarView.h
|
|
|
|
|
|
// CustomKeyboard
|
|
|
|
|
|
//
|
|
|
|
|
|
// Created by Mac on 2025/10/28.
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
|
|
#import <UIKit/UIKit.h>
|
|
|
|
|
|
|
|
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
|
|
2025-11-26 21:16:56 +08:00
|
|
|
|
/// 功能区顶部的 Bar:
|
|
|
|
|
|
/// 左侧:App 图标按钮(点击可回到主 App 或打开更多功能)
|
|
|
|
|
|
/// 右侧:升级 VIP 按钮
|
2025-10-28 15:18:12 +08:00
|
|
|
|
@class KBFunctionBarView;
|
|
|
|
|
|
|
|
|
|
|
|
@protocol KBFunctionBarViewDelegate <NSObject>
|
|
|
|
|
|
@optional
|
|
|
|
|
|
/// 左侧 4 个按钮点击(index: 0~3)
|
|
|
|
|
|
- (void)functionBarView:(KBFunctionBarView *)bar didTapLeftAtIndex:(NSInteger)index;
|
|
|
|
|
|
/// 右侧 3 个按钮点击(index: 0~2)
|
|
|
|
|
|
- (void)functionBarView:(KBFunctionBarView *)bar didTapRightAtIndex:(NSInteger)index;
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
2025-10-28 14:30:03 +08:00
|
|
|
|
@interface KBFunctionBarView : UIView
|
|
|
|
|
|
|
2025-10-28 15:18:12 +08:00
|
|
|
|
@property (nonatomic, weak, nullable) id<KBFunctionBarViewDelegate> delegate;
|
|
|
|
|
|
|
2025-11-26 21:16:56 +08:00
|
|
|
|
/// 左侧按钮(当前只有一个:App 图标)
|
2025-10-28 14:30:03 +08:00
|
|
|
|
@property (nonatomic, strong, readonly) NSArray<UIButton *> *leftButtons;
|
|
|
|
|
|
|
2025-11-26 21:16:56 +08:00
|
|
|
|
/// 右侧按钮(当前只有一个:升级 VIP)
|
2025-10-28 14:30:03 +08:00
|
|
|
|
@property (nonatomic, strong, readonly) NSArray<UIButton *> *rightButtons;
|
|
|
|
|
|
|
2025-11-26 21:16:56 +08:00
|
|
|
|
/// 预留的标题配置(目前按钮主要以图片为主,可选)
|
|
|
|
|
|
@property (nonatomic, copy) NSArray<NSString *> *leftTitles;
|
|
|
|
|
|
@property (nonatomic, copy) NSArray<NSString *> *rightTitles;
|
2025-10-28 14:30:03 +08:00
|
|
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
|
|
|
|
NS_ASSUME_NONNULL_END
|