Skip to content

Corner radius will not work if actionBackgroundColor applied #3

@hemangshah

Description

@hemangshah

Hey, @egmoll7 first of all nice work! I am experimenting with EMAlertController right now and found few issues with it.

cornerRadius will not work if I set actionBackgroundColor on actions.

Sample Code:

    let alertController = EMAlertController.init(title: "My App", message: "Are you really want to approve?")
    alertController.backgroundViewColor = UIColor.clear
    alertController.backgroundColor = UIColor.white
    alertController.iconImage = #imageLiteral(resourceName: "someImage")
    alertController.cornerRadius = 25.0
    
    let alertActionYes = EMAlertAction.init(title: "Yes", style: .normal) {
        print("Yes")
    }
    let alertActionCancel = EMAlertAction.init(title: "Cancel", style: .cancel) {
        print("Cancel")
    }
    
    alertActionYes.actionBackgroundColor = UIColor.red
    alertActionCancel.actionBackgroundColor = UIColor.red
    alertController.addAction(action: alertActionYes)
    alertController.addAction(action: alertActionCancel)
    self.present(alertController, animated: true, completion: nil) 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions