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

javascript - Confirm a form & display message if form is valid with JQuery -

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -