Create the simplest form of pop-up is very simple. Create a file with the extension .xib menu choose the right and add to the scene Label and Button, and then simply call the desired objects.
protocol popupViewControllerDelegate {
func pressOK(_ sender: popupViewController)
func pressCancel(_ sender: popupViewController)
}
class popupViewController: UIViewController {
var delegate:popupViewControllerDelegate?
@IBAction func btnOK(_ sender:UIButton) {
self.delegate?.pressOK(self)
}
@IBAction func btnCancel(_ sender:UIButton) {
self.delegate?.pressCancel(self)
}
Create the simplest form of pop-up is very simple. Create a file with the extension .xib menu choose the right and add to the scene Label and Button, and then simply call the desired objects.