Alert #9
Show Box:
let dialogBox = DialogBox.init()
dialogBox.addButton(title: "No", buttonAppearance: btnAppearanceNo) {
print("Pressed No")
}
dialogBox.addButton(title: "Go to App Store", buttonAppearance: btnAppearanceAppStore) {
print("Pressed Go to AppStore")
}
dialogBox.show(title: "Update required!", message: "We have made tremendous changes in the new
version, would you like to update the APP now?", boxApp: appearance)
Box Settings:
var appearance = BoxAppearance()
appearance.layout.padding = 0
appearance.layout.cornerRadius = 0.0
appearance.layout.width = 270.0
appearance.title.padding = "0|10|0|10"
appearance.title.textColor = UIColor.darkGray
appearance.title.backgroundColor = UIColor.init(red: 220.0/255.0, green: 220.0/255.0,
blue: 220.0/255.0, alpha: 1.0)
appearance.message.margin = "20|0|20|0"
appearance.message.textColor = UIColor.darkGray
appearance.message.font = UIFont.systemFont(ofSize: 16.0)
appearance.icon.type = BoxIconType.image
appearance.icon.image.name = "update"
appearance.icon.size = CGSize(width: 70, height: 70)
appearance.animation = BoxAnimationType.bounce
appearance.button.borderWidth = 1.0
appearance.button.borderColor = UIColor.lightGray
appearance.button.bottomPosition.layout = BoxButtonBottomPositionLayout.withoutSpacing
appearance.button.bottomPosition.maximumNoOfButtonsInSingleRow = 1
Button Setting – “No”
var btnAppearanceNo = BoxButtonAppearance()
btnAppearanceNo.backgroundColor = UIColor.white
btnAppearanceNo.textColor = UIColor.darkGray
Button Settings – “Go to App Store”
var btnAppearanceAppStore = BoxButtonAppearance()
btnAppearanceAppStore.backgroundColor = UIColor.init(red: 32.0/255.0, green: 128.0/255.0,
blue: 175.0/255.0, alpha: 1.0)
btnAppearanceAppStore.textColor = UIColor.white