# PopPullDown

[](https://developer.apple.com/xcode)
[](https://swift.org/)
[](https://github.com/chanjima/PopPullDown/blob/main/LICENSE)
PopPullDown in Swift
利用する場合は自己責任でお願いします。
[**English**](README.md)
## サンプル

## 使い方
import PopPullDownを追加
``` viewController.swift
import PopPullDown
@IBAction func didTapButton(_ sender: UIButton) {
let popPuullDown = PopPullDown(sender: sender, direction: .up)
popPuullDown.popPullDownDelegate = self
popPuullDown.items = ["Apple", "Banana", "Coconut"]
popPuullDown.present()
}
```
選択した項目を取得する場合はdelegateが必要です。
``` viewController.swift
extension ViewController: PopPullDownDelegate {
func selectedIndex(_ item: String) {
self.dismiss(animated: true)
print(item)
}
}
```
### Buttonポジション
⚠️ ボタンの位置が300を下回っている場合、自動で矢印の方向が変わります。
## インストール
### Swift Package Manager
TARGET > General > Frameworks, Libraries, and Embedded Content > +ボタン
## 今後追加する機能
- cocoaPodsのサポート
- 選択時のcheckMarkの追加