diff --git a/SwiftMessages/MessageView.swift b/SwiftMessages/MessageView.swift index a6f59083..e8a4044d 100644 --- a/SwiftMessages/MessageView.swift +++ b/SwiftMessages/MessageView.swift @@ -256,7 +256,7 @@ extension MessageView { - Parameter theme: The theme type to use. - Parameter iconStyle: The icon style to use. Defaults to `.Default`. */ - public func configureTheme(_ theme: Theme, iconStyle: IconStyle = .default) { + public func configureTheme(_ theme: SMTheme, iconStyle: IconStyle = .default) { let iconImage = iconStyle.image(theme: theme) switch theme { case .info: diff --git a/SwiftMessages/Theme.swift b/SwiftMessages/Theme.swift index 5bf10a4e..2aa77993 100644 --- a/SwiftMessages/Theme.swift +++ b/SwiftMessages/Theme.swift @@ -9,7 +9,7 @@ import UIKit /// The theme enum specifies the built-in theme options -public enum Theme { +public enum SMTheme { case info case success case warning @@ -47,7 +47,7 @@ public enum IconStyle { case none /// Returns the image for the given theme - public func image(theme: Theme) -> UIImage? { + public func image(theme: SMTheme) -> UIImage { switch (theme, self) { case (.info, .default): return Icon.info.image case (.info, .light): return Icon.infoLight.image