ios - UIImage overlaps with UITextField within a UIAlertController -


my code this:

let alert = uialertcontroller(title: "title", message: "alert", preferredstyle: uialertcontrollerstyle.alert) let image_view = uiimageview(frame: cgrectmake(70, 10, 200, 200)) image_view.image = uiimage(named: "logo") alert.view.addsubview(image_view) alert.addtextfieldwithconfigurationhandler { textfield in textfield.placeholder = "a textfield" alert.addtextfieldwithconfigurationhandler { textfield in textfield.placeholder = "another textfield" } 

yet results in logo overlapping uitextfields. how can make sure neatly stacked 1 below other??

from point of view if create uialertcontroller custom ui try create you're own. or if use bit hacky solution this:

let image = uiimage(named: "logo") alert.setvalue(image, forkey: "image") 

Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -