SCLAlertView-Swift
SCLAlertView-Swift copied to clipboard
How to add custom image to icon using custom alert?
I can't seem to get this working, every time i try and do it, it only fills up half the alert icon size. I've tried different sizes but nothing works.
I have faced similar issue. I looked into the source code and find out that images are drawn programmatically using UIBezierPath and their size is 80x80 (which I think is important in this particular implementation). For myself I solved the issue by drawing the image using vector graphics.
Have a look at SCLAlertView class. You may find answers for your question there, since original implementation uses this class to generate icons.
Change kCircleIconHeight variable in the SCLAppearance
For Example:
let appearance = SCLAlertView.SCLAppearance(
kCircleIconHeight: 55.0,
kTitleFont: UIFont(name: "Avenir-Light", size: 16)!,
kTextFont: UIFont(name: "Avenir-Light", size: 14)!,
kButtonFont: UIFont(name: "Avenir", size: 14)!,
showCloseButton: false
)