ios - How to add UITableView in a UIAlertView in swift -


how dynamically add uitableview in uialertview. after adding subview of uialertview uitableview not displayed.

 override func viewdidload() {     super.viewdidload()     tableview.frame         =   cgrectmake(0, 50, 320, 200);     tableview.delegate      =   self     tableview.datasource    =   self     tableview.registerclass(uitableviewcell.self, forcellreuseidentifier: "cell") }  @ibaction func textfieldcliked(sender: anyobject) {     alertview.message = "table view"     alertview.addbuttonwithtitle("ok")     alertview.addsubview(tableview)     alertview.show() } 

i dont think can uialertview, can make small view , present modally or uipopoverpresentationcontroller


Comments