-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathTextStyles.swift
70 lines (67 loc) · 2.24 KB
/
TextStyles.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
import Foundation
import UIKit
enum TextStyle: String {
case EventTitle = "EventTitle"
case EventInfo = "EventInfo"
case Description = "Description"
case AdditionalInfo = "AdditionalInfo"
case CustomButton = "CustomButton"
case CellTitle = "CellTitle"
case CellTime = "CellTime"
case CellLocation = "CellLocation"
case CellNotification = "CellNotification"
case EmptyTitle = "EmptyTitle"
case EmptyDescription = "EmptyDescription"
func getUIColor() -> UIColor {
switch self {
case .EventTitle:
return Color.Default.getUIColor()
case .EventInfo:
return Color.AppTint.getUIColor()
case .Description:
return Color.Default.getUIColor()
case .AdditionalInfo:
return Color.Grey2.getUIColor()
case .CustomButton:
return Color.AppTint.getUIColor()
case .CellTitle:
return Color.Default.getUIColor()
case .CellTime:
return Color.Gray1.getUIColor()
case .CellLocation:
return Color.Grey3.getUIColor()
case .CellNotification:
return Color.Red.getUIColor()
case .EmptyTitle:
return Color.Grey4.getUIColor()
case .EmptyDescription:
return Color.Grey4.getUIColor()
}
}
func getUIFont() -> UIFont {
switch self {
case .EventTitle:
return UIFont.systemFontOfSize(17, weight: UIFontWeightSemibold)
case .EventInfo:
return UIFont.systemFontOfSize(16)
case .Description:
return UIFont.systemFontOfSize(16)
case .AdditionalInfo:
return UIFont.systemFontOfSize(16)
case .CustomButton:
return UIFont.systemFontOfSize(17)
case .CellTitle:
return UIFont.systemFontOfSize(17)
case .CellTime:
return UIFont.systemFontOfSize(13)
case .CellLocation:
return UIFont.systemFontOfSize(13)
case .CellNotification:
return UIFont.systemFontOfSize(17)
case .EmptyTitle:
return UIFont.systemFontOfSize(35, weight: UIFontWeightLight)
case .EmptyDescription:
return UIFont.systemFontOfSize(17)
}
}
}