Skip to content

Commit d4679fc

Browse files
refactor: delete useless files, improve code style
1 parent 3a23172 commit d4679fc

8 files changed

Lines changed: 408 additions & 469 deletions

File tree

Binary file not shown.

Example App/Pods/Pods.xcodeproj/project.pbxproj

Lines changed: 398 additions & 422 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Sources/EmojiPicker/Extensions/Foundation/Array.swift

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

Sources/EmojiPicker/Resources/Data/1.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

Sources/EmojiPicker/Resources/Data/2.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

Sources/EmojiPicker/Resources/Data/3.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

Sources/EmojiPicker/Resources/Data/4.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

Sources/EmojiPicker/Views/EmojiCategoryView/EmojiCategoryIconView.swift

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,9 @@ final class EmojiCategoryIconView: UIView {
4444

4545
// MARK: - Init
4646

47-
init(type: CategoryType,
48-
selectedIconTintColor: UIColor
47+
init(
48+
type: CategoryType,
49+
selectedIconTintColor: UIColor
4950
) {
5051
self.type = type
5152
self.selectedIconTintColor = selectedIconTintColor
@@ -65,16 +66,19 @@ final class EmojiCategoryIconView: UIView {
6566
/// - Parameter state: Target icon state. Based on this state, the target color will be selected.
6667
func updateIconTintColor(for state: EmojiCategoryIconViewState) {
6768
guard self.state != state else { return }
68-
6969
self.state = state
70+
7071
switch state {
7172
case .standard:
7273
currentIconTintColor = .systemGray
74+
7375
case .highlighted:
7476
currentIconTintColor = currentIconTintColor.adjust(by: 40)
77+
7578
case .selected:
7679
currentIconTintColor = selectedIconTintColor
7780
}
81+
7882
setNeedsDisplay()
7983
}
8084
}
@@ -87,8 +91,9 @@ extension EmojiCategoryIconView {
8791
super.draw(rect)
8892

8993
/// New centered rect based on bounds width to prevent stretching of the icon.
90-
let rect = CGRect(origin: CGPoint(x: 0, y: (rect.height - rect.width) / 2),
91-
size: CGSize(width: rect.width, height: rect.width)
94+
let rect = CGRect(
95+
origin: CGPoint(x: 0, y: (rect.height - rect.width) / 2),
96+
size: CGSize(width: rect.width, height: rect.width)
9297
)
9398

9499
switch type {

0 commit comments

Comments
 (0)