From d00cdd15e208b462ee1eb0b16f682cc416d88dec Mon Sep 17 00:00:00 2001 From: Patrick Date: Mon, 3 Oct 2016 08:19:08 +0200 Subject: [PATCH] fix generic Theme enum with prefix SM --- SwiftMessages/MessageView.swift | 2 +- SwiftMessages/Theme.swift | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/SwiftMessages/MessageView.swift b/SwiftMessages/MessageView.swift index 8c816e8e..bfb60182 100644 --- a/SwiftMessages/MessageView.swift +++ b/SwiftMessages/MessageView.swift @@ -156,7 +156,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 a31bc579..8e728a77 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 @@ -46,7 +46,7 @@ public enum IconStyle { case subtle /// 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