Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renamed Theme enum #35

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion SwiftMessages/MessageView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions SwiftMessages/Theme.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down