-
Notifications
You must be signed in to change notification settings - Fork 0
/
StyleManager.swift
102 lines (76 loc) · 1.9 KB
/
StyleManager.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
//
// StyleManager.swift
//
// Created by Seyhun Akyürek on 16/10/2016.
// Copyright © 2016 seyhunak. All rights reserved.
//
import Foundation
import ChameleonFramework
typealias Style = StyleManager
//MARK: - StyleManager
final class StyleManager {
// MARK: - StyleManager
static func setUpTheme() {
Chameleon.setGlobalThemeUsingPrimaryColor(primaryTheme(), withSecondaryColor: theme(), usingFontName: font(), andContentStyle: content())
}
// MARK: - Theme
static func primaryTheme() -> UIColor {
return FlatMint()
}
static func theme() -> UIColor {
return FlatWhite()
}
static func toolBarTheme() -> UIColor {
return FlatMint()
}
static func tintTheme() -> UIColor {
return FlatMint()
}
static func titleTextTheme() -> UIColor {
return FlatWhite()
}
static func titleTheme() -> UIColor {
return FlatCoffeeDark()
}
static func textTheme() -> UIColor {
return FlatMint()
}
static func backgroudTheme() -> UIColor {
return FlatMint()
}
static func positiveTheme() -> UIColor {
return FlatMint()
}
static func negativeTheme() -> UIColor {
return FlatRed()
}
static func clearTheme() -> UIColor {
return UIColor.clearColor()
}
// MARK: - Content
static func content() -> UIContentStyle {
return UIContentStyle.Contrast
}
// MARK: - Font
static func font() -> String {
return UIFont(name: FontType.Primary.fontName, size: FontType.Primary.fontSize)!.fontName
}
}
//MARK: - FontType
enum FontType {
case Primary
}
extension FontType {
var fontName: String {
switch self {
case .Primary:
return "HelveticaNeue"
}
}
var fontSize: CGFloat {
switch self {
case .Primary:
return 16
}
}
}