BABottomSliderMenu 1.0.4

BABottomSliderMenu 1.0.4

BettoAkkara 维护。



  • bettoakkara

BABottomSliderMenu

BABottomSliderMenu 是一个可定制的底部滑动菜单。

兼容性

BABottomSliderMenu 需要 iOS 13+ 且与 Swift 5 项目兼容。

安装

将文件夹 Source 拖放到您的项目中。

使用方法

BABottomSliderMenu 被设计得易于使用。

创建单元

按照以下方式创建单元:

        let cell1 = BASliderViewCellProperties(
            nibName: BASliderViewCellIdetifiers.imageCell.rawValue,
            cellIdentifier: BASliderViewCellIdetifiers.imageCell,
            index: 1,
            itemProperties: [BASliderItemProperties(
                itemID: 10001,
                text: "",
                font: UIFont.systemFont(ofSize: 12, weight: .regular),
                textColour: .black,
                textAlignment: .center,
                backgroundColour: .white,
                desiredHeight: 50,
                imageName: "icCross"
            )]
        )

我们有不同类型的默认单元类型

headerCell
buttonCell
twoButtonCell
imageCell
textCell

根据要求,我们可以定义自己的单元格。

如何操作?

  1. 使用.xib创建tableView单元格
  2. BASlideViewDefaultTableViewCell作为tableView单元格的class进行分配
  3. 重写itemProperties
  4. 您的新单元格已准备好。

显示

完成单元格创建后,创建一个[BASliderViewCellProperties]数组。

        let sliderViewCells = [cell1, cell2, cell3, cell4]  // [BASliderViewCellProperties]

然后,

        BASlider.show(title: "Alert", sliderViewCells: sliderViewCells, dismissOnTap: true, isHeaderEnabled: true, controller: self)

祝你好运

作者

Betto Akkara

许可证

BABottomSliderMenu采用MIT许可证发布。有关详细信息,请参阅LICENSE文件。