How can i fix " Use of unresolved identifier 'popover' " this error ?
@IBAction func btnSelectClick(_ sender: UIButton) {
let popController = PopoverController(items: setupPopItem(), fromView: acceptButton, direction: .up, reverseHorizontalCoordinates: true, style: PopoverStyle.normal, initialIndex: 1) {
print("Yeah Done !!")
}
//Im getting an error on this line
popover(popController)
}
private func setupPopItem() -> [PopoverItem]{
let google = PopoverItem(title: "Google", titleColor: .clear, image: #imageLiteral(resourceName: "a1")) {
debugPrint($0.title)
}
let fb = PopoverItem(title: "FB", titleColor: .clear, image: #imageLiteral(resourceName: "a3")){
debugPrint($0.title)
}
return [google, fb]
}
}
xwu
(Xiaodi Wu)
2
Hi! You’re likely to have the best results posting this question to the Apple Developer Forums. This forum is focused specifically on the Swift language itself, and you’ve posted in a section for development of the Swift compiler; I’ve moved your question to the “Using Swift” section.
1 Like