测试已测试 | ✗ |
语言语言 | SwiftSwift |
许可证 | MIT |
发布上次发布 | 2017年8月 |
SwiftSwift 版本 | 3.0 |
SPM支持 SPM | ✗ |
由 Burak Üstün 维护。
要运行示例项目,先克隆仓库,然后在 Example 目录中运行 pod install
设置 BUSimplePopupManager
import UIKit
import BULoopView
var arrayLoop: [LoopItem] = []
override func viewDidLoad() {
super.viewDidLoad()
/*
Set the properties
**/
LoopView.LoopItemWidth = 180
LoopView.LoopItemMargin = 30
LoopView.backgroundColor = UIColor.blue
/*
Create an LoopItem array and fill it
**/
for i in 0..<10{
let item = LoopItem.init(_name: "Test\(i)", _photoPath: "https://burakustn.com/assets/images/logo.png")
self.arrayLoop.append(item!)
}
/*
Load the BULoopView
**/
self.LoopView.loadLoopView(LoopArray: self.arrayLoop)
}
您可以自定义以下所有设置
/**
* Use to set the Loop Items Space
*/
public var LoopSpace: CGFloat = 10.0
/**
* Use to set the Loop Items Width
*/
public var LoopItemWidth: CGFloat = 150.0
/**
* Use to set the Loop Items Margin
*/
public var LoopItemMargin:CGFloat = 10.0
/**
* Use to set the Loop Items Image Width
*/
public var LoopItemImageWidth:CGFloat = 50.0
/**
* Use to set the Loop Items Seperator Color
*/
public var seperatorColor:UIColor = UIColor( red:0.961, green:0.961, blue:0.961, alpha:1)
/**
* Use to set the Loop Seperator Alpha
*/
public var seperatorAlpha:CGFloat = 0.7
/**
* Use to set the Loop Items Text Color
*/
public var textColor:UIColor = UIColor( red:0.961, green:0.961, blue:0.961, alpha:1)
/**
* Use to set the Loop Items Text Font
*/
public var labelFont:UIFont? = nil
您可以使用 BULoopViewDelegate 的 didSelectIndexAt 方法来处理点击事件。
extension SampleViewController : BULoopViewDelegate{
func didSelectIndexAt(Index: Int) {
print("Selected Index : \(Index)")
}
}
BUSimplePopup 通过 CocoaPods 提供。要安装它,只需将以下行添加到您的 Podfile。
pod "BULoopView"
Burak Üstün
[emailmale@txto;com]
Twitter.com/burakustn
Github.com/burakustn
BULoopView 在 MIT 许可下提供。有关更多信息,请参阅 LICENSE 文件。