PopPullDown in Swift
Please note that any additions are at your own risk.
import PopPullDown to use it.
import PopPullDown
@IBAction func didTapButton(_ sender: UIButton) {
let popPuullDown = PopPullDown(sender: sender, direction: .up)
popPuullDown.popPullDownDelegate = self
popPuullDown.items = ["Apple", "Banana", "Coconut"]
popPuullDown.present()
}
If you want to know the result, a delegate is required.
extension ViewController: PopPullDownDelegate {
func selectedIndex(_ item: String) {
self.dismiss(animated: true)
print(item)
}
}
TARGET > General > Frameworks, Libraries, and Embedded Content > Press the bottom + button.
- Support for cocoaPods
- Selected checkMark