Skip to content

Commit 05ede47

Browse files
committed
Updated
1 parent 227df86 commit 05ede47

17 files changed

+1209
-608
lines changed

Sources/UIFloatMenu.swift

Lines changed: 301 additions & 117 deletions
Large diffs are not rendered by default.

Sources/UIFloatMenuAction.swift

Lines changed: 71 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -5,70 +5,75 @@
55

66
import UIKit
77

8-
//MARK: - selectionConfig
9-
public enum selectionConfig {
10-
case multi(isSelected: Bool = false, selectedIcon: UIImage?, selectedTitle: String, defaultIcon: UIImage?, defaultTitle: String)
11-
case `default`(icon: UIImage? = nil, title: String)
12-
}
13-
14-
//MARK: - transition_style
15-
public enum transition_style {
16-
case `default`(animated: Bool = true)
17-
case fade
18-
}
19-
20-
//MARK: - h_heightStyle
21-
public enum h_heightStyle {
22-
case compact
23-
case standard
24-
}
25-
26-
//MARK: - h_cellLayout
27-
public enum h_cellLayout {
28-
case Icon_Title
29-
case center
30-
case Title_Icon
31-
}
32-
33-
//MARK: - heightStyle
34-
public enum heightStyle {
35-
case compact
36-
case standard
37-
case big
38-
}
8+
//MARK: - itemSetup
9+
public enum itemSetup {
10+
11+
//MARK: - selectionConfig
12+
public enum selectionConfig {
13+
case multi(isSelected: Bool = false, selectedIcon: UIImage?, selectedTitle: String, defaultIcon: UIImage?, defaultTitle: String)
14+
case `default`(icon: UIImage? = nil, title: String)
15+
}
3916

40-
//MARK: - labelConfig
41-
public enum labelConfig {
42-
case config(fontSize: CGFloat = 15, fontWeight: UIFont.Weight = .semibold)
43-
}
17+
//MARK: - transition_style
18+
public enum transition_style {
19+
case `default`(animated: Bool = true)
20+
case fade
21+
}
4422

45-
//MARK: - itemColor
46-
public enum itemColor {
47-
case standard
48-
case clear
49-
case filled(_ color: UIColor)
50-
case tinted(_ color: UIColor)
51-
case custom(iconColor: UIColor = .clear, textColor: UIColor, backColor: UIColor)
52-
}
23+
//MARK: - h_heightStyle
24+
public enum h_heightStyle {
25+
case compact
26+
case `default`
27+
}
5328

54-
//MARK: - cellLayout
55-
public enum cellLayout {
56-
case Icon_Title
57-
case Title_Icon
58-
}
29+
//MARK: - h_cellLayout
30+
public enum h_cellLayout {
31+
case Icon_Title
32+
case center
33+
case Title_Icon
34+
}
5935

60-
//MARK: - spacerType
61-
public enum spacerType {
62-
case empty
63-
case line(_ color: UIColor = UIColor.gray.withAlphaComponent(0.25), inset: CGFloat = 15)
64-
case dashedLine(_ color: UIColor = UIColor.gray.withAlphaComponent(0.35))
65-
case divider
66-
}
36+
//MARK: - heightStyle
37+
public enum heightStyle {
38+
case compact
39+
case `default`
40+
case big
41+
}
6742

43+
//MARK: - inputType
44+
public enum inputType {
45+
case textField(text: String = "", isSecure: Bool = false, content: UITextContentType? = nil, keyboard: UIKeyboardType = .default)
46+
case textView(text: String = "", content: UITextContentType? = nil, keyboard: UIKeyboardType = .default)
47+
}
48+
49+
//MARK: - labelConfig
50+
public enum labelConfig {
51+
case config(fontSize: CGFloat = 15, fontWeight: UIFont.Weight = .semibold)
52+
}
6853

54+
//MARK: - itemColor
55+
public enum itemColor {
56+
case `default`
57+
case clear
58+
case filled(_ color: UIColor)
59+
case tinted(_ color: UIColor)
60+
case custom(iconColor: UIColor = .clear, textColor: UIColor, backColor: UIColor)
61+
}
6962

70-
//MARK: - itemSetup
71-
public enum itemSetup {
63+
//MARK: - cellLayout
64+
public enum cellLayout {
65+
case Icon_Title
66+
case Title_Icon
67+
}
68+
69+
//MARK: - spacerType
70+
public enum spacerType {
71+
case empty(height: CGFloat = 12)
72+
case line(_ color: UIColor = UIColor.gray.withAlphaComponent(0.25), inset: CGFloat = 15)
73+
case dashedLine(_ color: UIColor = UIColor.gray.withAlphaComponent(0.35))
74+
case divider
75+
}
76+
7277
/**
7378
UIFloatMenu: ActionCell
7479

@@ -77,8 +82,8 @@ public enum itemSetup {
7782
- Parameter layout: Loyout of cell (**.Title_Icon**, **.Icon_Title**), Default: **.Title_Icon**.
7883
- Parameter height: Height of cell (**.standard**, **.compact**), Default: **.standard**.
7984
*/
80-
case ActionCell(selection: selectionConfig, subtitle: String = "", itemColor: itemColor = .standard,
81-
layout: cellLayout = .Icon_Title, height: heightStyle = .standard)
85+
case ActionCell(selection: selectionConfig, subtitle: String = "", itemColor: itemColor = .default,
86+
layout: cellLayout = .Icon_Title, height: heightStyle = .default)
8287

8388
/**
8489
UIFloatMenu: Title
@@ -92,7 +97,7 @@ public enum itemSetup {
9297

9398
- Parameter type: Type of spacer (**.empty**, **.line**, **.divider**)
9499
*/
95-
case Spacer(type: spacerType = .empty)
100+
case Spacer(type: spacerType = .empty())
96101

97102
/**
98103
UIFloatMenu: InfoCell
@@ -105,17 +110,14 @@ public enum itemSetup {
105110
label: labelConfig = .config(fontSize: 15, fontWeight: .semibold))
106111

107112
/**
108-
UIFloatMenu: TextFieldCell
113+
UIFloatMenu: InputCell
109114

110-
- Parameter title: Data in TextField at start
115+
- Parameter type: **.textField()** or **.textView()**
111116
- Parameter placeholder: Placeholder
112117
- Parameter isResponder: Is active at start
113-
- Parameter isSecure: Show dots
114-
- Parameter content: UITextContentType
115-
- Parameter keyboard: UIKeyboardType
118+
- Parameter identifier: Identifier to search data in **UIFloatMenuGetInputData** delegate
116119
*/
117-
case TextFieldCell(title: String = "", placeholder: String, isResponder: Bool = false,
118-
isSecure: Bool = false, content: UITextContentType? = nil, keyboard: UIKeyboardType = .default, identifier: String = "")
120+
case InputCell(type: inputType, placeholder: String, isResponder: Bool = false, identifier: String = "")
119121

120122
/**
121123
UIFloatMenu: SwitchCell
@@ -141,11 +143,11 @@ public enum itemSetup {
141143
/**
142144
UIFloatMenu: HorizontalCell
143145

144-
- Parameter items: actions [UIFloatMenuAction]
146+
- Parameter items: actions **[UIFloatMenuAction]**
145147
- Parameter height: h_heightStyle
146148
- Parameter layout: h_cellLayout
147149
*/
148-
case HorizontalCell(items: [UIFloatMenuAction], height: h_heightStyle = .standard, layout: h_cellLayout = .center)
150+
case HorizontalCell(items: [UIFloatMenuAction], height: h_heightStyle = .default, layout: h_cellLayout = .center)
149151

150152
/**
151153
UIFloatMenu: CustomCell

Sources/UIFloatMenuAnimation.swift

Lines changed: 0 additions & 96 deletions
This file was deleted.

0 commit comments

Comments
 (0)