cruffenach / CRToast

A modern iOS toast view that can fit your notification needs
MIT License
4.17k stars 463 forks source link

Options in swift CustomType #197

Open ylecuyer opened 8 years ago

ylecuyer commented 8 years ago

When using with swift there is an error when setting custom type:

let options = [ kCRToastNotificationTypeKey: CRToastType.Custom, kCRToastTextKey: "Good", kCRToastBackgroundColorKey: UIColor.init(red: 0, green: 0.67, blue: 0, alpha: 1), kCRToastNotificationPreferredHeightKey: 50, ]

We have to replace CRToastType.Custom by 2

let options = [ kCRToastNotificationTypeKey: 2, kCRToastTextKey: "Good", kCRToastBackgroundColorKey: UIColor.init(red: 0, green: 0.67, blue: 0, alpha: 1), kCRToastNotificationPreferredHeightKey: 50, ]

mixdesign commented 8 years ago

@ylecuyer use CRToastType.Custom.rawValue