I have done everything perfectly but dropdown does not show, when i click on my view dropdown.show code does not execute, but when i open the keyboard and close it and than i click on my view DropDown shows perfectly, below is my code
import DropDown
class ViewController: UIViewController {
@IBOutlet weak var filterButtonView: UIView!
var countryString = ""
let countryDropDown = DropDown()
var countryList:[String] = ["Afghanistan", "Albania"]
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
self.countryDropDown.anchorView = self.selectCountryView
self.countryDropDown.dataSource = self.countryList
self.countryDropDown.direction = .any
self.countryDropDown.selectionAction = { [unowned self] (index: Int, item: String) in
print("Selected item: \(item) at index: \(index)")
self.countryString = item
}
self.selectCountryView.isUserInteractionEnabled = true
let countryTapGesture: UITapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(ViewController.showCountryDropDown))
self.selectCountryView.addGestureRecognizer(countryTapGesture)
}
@objc func showCountryDropDown() {
print("Country Clicked")
self.countryDropDown.show()
}
I have done everything perfectly but dropdown does not show, when i click on my view dropdown.show code does not execute, but when i open the keyboard and close it and than i click on my view DropDown shows perfectly, below is my code
import DropDown
class ViewController: UIViewController {
@IBOutlet weak var filterButtonView: UIView!
override func viewDidLoad() { super.viewDidLoad()
}