i have uialertcontroller preferred style actionsheetworking no problems. prevent lengthy wall of code, have deleted actions in uialertaction closures , adding code:
let alert = uialertcontroller(title: "more actions", message: nil, preferredstyle: .actionsheet) //alert.view.tintcolor = uicolor(red: cgfloat(252.0/255.0), green: cgfloat(112.0/255.0), blue: cgfloat(87.0/255.0), alpha: 1.0) alert.addaction(uialertaction(title: "rename", style: .default, handler: { (action: uialertaction!) -> void in })) alert.addaction(uialertaction(title: "move", style: .default, handler: { (action: uialertaction!) -> void in })) alert.addaction(uialertaction(title: "keep offline", style: .default, handler: { (action: uialertaction!) -> void in })) alert.addaction(uialertaction(title: "cancel", style: .cancel, handler: nil)) self.presentviewcontroller(alert, animated: true, completion: nil) this code works fine , results this:

however when uncomment line i'm setting tintcolor, lose gap between .default buttons , .cancel button:

is there way prevent happening, or consequence of tiny detail overlooked?
the alert view tint needs set after styling.
Comments
Post a Comment