To run the example project, clone the repo, and run pod install
from the Example directory first.
let data = 1...5
let dataArray = data.map { (title) -> YCPopMenuDemoItem in
var item = YCPopMenuDemoItem()
item.menuHeight = 40
item.title = "\(title)"
item.id = title
item.available = title % 3 == 0
return item
}
let pop = YCPopMenu(dataArray: dataArray, cellClass: YCPopMenuDemoCell.self) { _, data in
print(data)
}
pop.preferences.basic.menuSize = CGSize(width: 100, height: 30)
pop.preferences.basic.arrowSize = CGSize(width: 10, height: 5)
pop.preferences.basic.coverEdgeInsets = UIEdgeInsetsMake(40, 0, 0, 0)
pop.showFromView(view: sender)
YCPopMenu is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'YCPopMenu'
ungacy, [email protected]
YCPopMenu is available under the MIT license. See the LICENSE file for more info.