要运行示例项目,请克隆仓库,并首先从 Example 目录运行 pod install
YFPopupButtons 通过 CocoaPods 提供。要安装它,只需将以下行添加到您的 Podfile 中
pod "YFPopupButtons"
var testView = YFPopupButtonsView()
testView.delegate = self
testView.show()
testView.dismiss()
func numOfItems(buttonsView: YFPopupButtonsView) -> Int
func maxNumberOfItemsInRow(buttonsView: YFPopupButtonsView) -> Int
func itemSize(buttonsView: YFPopupButtonsView) -> CGSize
func buttonsView(buttonsView: YFPopupButtonsView, itemForIndex index: Int) -> YFPopupbotton
定义带图像和标题的圆形按钮的示例。
func buttonsView(buttonsView: YFPopupButtonsView, itemForIndex index: Int) -> YFPopupbotton {
let button = YFPopupbotton(contentImage: UIImage(named: "fbIcon")!, title: "Title")
button.contentImageView.layer.cornerRadius = 30
button.contentImageView.backgroundColor = .whiteColor()
button.contentImageView.contentMode = .ScaleAspectFill
return button
}
func buttonsView(buttonsView: YFPopupButtonsView, didTapItemAtIndex index: Int)
func sideMargin(buttonsView: YFPopupButtonsView) -> CGFloat
func spaceBetweenRows(buttonsView: YFPopupButtonsView) -> CGFloat
func buttonsViewWillAppear(buttonsView: YFPopupButtonsView)
func buttonsViewWillDisappear(buttonsView: YFPopupButtonsView)
pushian,[email protected]
YFPopupButtons 在 MIT 许可证下可用。有关更多信息,请参阅 LICENSE 文件。