TestsTested | ✗ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Aug 2017 |
SwiftSwift Version | 3.0 |
SPMSupports SPM | ✗ |
Maintained by Burak Üstün.
To run the example project, clone the repo, and run pod install
from the Example directory first.
Setup the 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)
}
You can customize everything below
/**
* 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
You can handle the click event using BULoopViewDelegate’s didSelectIndexAt method.
extension SampleViewController : BULoopViewDelegate{
func didSelectIndexAt(Index: Int) {
print("Selected Index : \(Index)")
}
}
BUSimplePopup is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "BULoopView"
Burak Üstün
[email protected]
Twitter.com/burakustn
Github.com/burakustn
BULoopView is available under the MIT license. See the LICENSE file for more info.