I created a popup alert using alert controller and added two alert actions(ok and cancel) as below.
UIAlertController * alert= [UIAlertController
Swift 3
let alert = UIAlertController(title: nil, message: nil, preferredStyle: .alert)
let textView = UITextView()
textView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
let controller = UIViewController()
textView.frame = controller.view.frame
controller.view.addSubview(textView)
alert.setValue(controller, forKey: "contentViewController")
let height: NSLayoutConstraint = NSLayoutConstraint(item: alert.view, attribute: .height, relatedBy: .equal, toItem: nil, attribute: .notAnAttribute, multiplier: 1, constant: view.frame.height * 0.8)
alert.view.addConstraint(height)
present(alert, animated: true, completion: nil)