| 123456789101112131415161718192021222324252627282930313233343536 |
- //
- // CustomTabbarView.h
- // BuguLive
- //
- // Created by qitewei on 2025/8/27.
- // Copyright © 2025 xfg. All rights reserved.
- //
- #import <UIKit/UIKit.h>
- NS_ASSUME_NONNULL_BEGIN
- @class CustomTabbarView;
- @protocol CustomTabbarViewDelegate <NSObject>
- @optional
- - (void)customTabbarView:(CustomTabbarView *)tabbarView didSelectItemAtIndex:(NSInteger)index;
- @end
- @interface CustomTabbarView : UIView
- @property (nonatomic, strong) UIStackView *stackView;
- @property (nonatomic, weak) id<CustomTabbarViewDelegate> delegate;
- @property (nonatomic, assign) NSInteger selectedIndex;
- // 添加TabBar项
- - (void)addTabBarItemWithTitle:(NSString *)title
- normalImage:(NSString *)normalImage
- selectedImage:(NSString *)selectedImage;
- // 设置选中状态
- - (void)setSelectedIndex:(NSInteger)selectedIndex animated:(BOOL)animated;
- @end
- NS_ASSUME_NONNULL_END
|