BBABottomActionSheetListView.h 1.2 KB
//
//  BBABottomActionSheetListView.h
//  BBAUIKit
//
//  Created by Ning,Liujie on 2020/7/25.
//  Copyright © 2020 Baidu. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "BBABottomActionSheetItem.h"

typedef void (^actionSheetItemClickBlock)(NSInteger index);

@interface BBABottomActionSheetListView : UIView

/// 点击事件回调
@property (nonatomic, copy) actionSheetItemClickBlock itemClickBlock;


///  创建展示的列表
///
/// @param title BBABottomActionSheet的标题
/// @param itemsArray  展示的文本区域的数组
/// @param customItemsArray 展示的自定义的区域数组

- (instancetype)initWithTitle:(NSString *)title
                        items:(NSArray <BBABottomActionSheetItem *> *)itemsArray
                  customItems:(NSArray <BBABottomActionSheetCustomItem *> *)customItemsArray;


/// 外部更新了已加入列表item数据或者自定义的视图,需要刷新界面,调用该方法进行界面刷新

- (void)reloadData;

/// 更新列表中的列表项,根据传入新的列表项刷新列表
- (void)reloadWithItems:(NSArray <BBABottomActionSheetItem *> *)itemsArray
            customItems:(NSArray <BBABottomActionSheetCustomItem *> *)customItemsArray;

@end