sparrowcode / AlertKit

Native alert from Apple Music & Feedback. Contains Done, Heart & Message and other presets.
https://sparrowcode.io/frameworks
MIT License
2.39k stars 133 forks source link

Corner radius and everything that is setup in self.commonInit() are not working. #5

Closed mbalinionut closed 5 years ago

mbalinionut commented 5 years ago

Consider adding self.commonInit() in public func present() { } this will resolve the problem.

ivanvorobei commented 5 years ago

What you try customise? Only corner radius?

mbalinionut commented 5 years ago

Not only corner radius, everything that is in commonInit() .

This is my use case:

let alertView = SPAlertView(title: "Could not save.", message: "\(error!), \(error!.userInfo)", preset: SPAlertPreset.error)
alertView.cornerRadius = 40
alertView.duration = 2
alertView.dismissByTap = true
alertView.haptic = .success
alertView.present()
mbalinionut commented 5 years ago

You can resolve this very quickly by adding commonInit() only in present().

ivanvorobei commented 5 years ago

I am upload new version 1.0.4, please, update. Property cornerRadius removed. Change it with code:

alertView.layer.cornerRadius = 40

Other properties work correctly. Thanks for issue.