Skip to content

Commit dd1e107

Browse files
refactor: added test target in Package.swift made minor updates
1 parent f05f8e9 commit dd1e107

11 files changed

Lines changed: 41 additions & 16 deletions

File tree

EmojiPicker.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'EmojiPicker'
3-
s.version = '2.1.2'
3+
s.version = '2.1.3'
44
s.license = 'MIT'
55
s.summary = 'Emoji picker for iOS like on MacOS'
66
s.homepage = 'https://github.com/htmlprogrammist/EmojiPicker'

Example App/AppImport/Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ let package = Package(
1111
targets: ["AppImport"]),
1212
],
1313
dependencies: [
14-
.package(url: "https://github.com/htmlprogrammist/EmojiPicker", .upToNextMajor(from: "2.1.2"))
14+
.package(url: "https://github.com/htmlprogrammist/EmojiPicker", .upToNextMajor(from: "2.1.3"))
1515
],
1616
targets: [
1717
.target(

Example App/iOS Example.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

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

Package.swift

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,21 @@ let package = Package(
99
products: [
1010
.library(
1111
name: "EmojiPicker",
12-
targets: ["EmojiPicker"]),
12+
targets: ["EmojiPicker"]
13+
)
1314
],
1415
dependencies: [],
1516
targets: [
1617
.target(
1718
name: "EmojiPicker",
18-
dependencies: [],
19-
resources: [.process("Resources")])
19+
resources: [
20+
.process("Resources")
21+
]
22+
),
23+
.testTarget(
24+
name: "EmojiPickerTests",
25+
dependencies: ["EmojiPicker"]
26+
)
2027
],
21-
swiftLanguageVersions: [.v4_2]
28+
swiftLanguageVersions: [.v4_2, .v5]
2229
)

Sources/EmojiPicker/Extensions/Foundation/Bundle.swift

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,23 @@
1+
// The MIT License (MIT)
2+
// Copyright © 2022 Ivan Izyumkin
13
//
2-
// Bundle.swift
3-
// EmojiPicker
4+
// Permission is hereby granted, free of charge, to any person obtaining a copy
5+
// of this software and associated documentation files (the "Software"), to deal
6+
// in the Software without restriction, including without limitation the rights
7+
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8+
// copies of the Software, and to permit persons to whom the Software is
9+
// furnished to do so, subject to the following conditions:
410
//
5-
// Created by Егор Бадмаев on 13.01.2023.
11+
// The above copyright notice and this permission notice shall be included in all
12+
// copies or substantial portions of the Software.
613
//
14+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20+
// SOFTWARE.
721

822
import Foundation
923

Sources/EmojiPicker/Views/EmojiCategoryView/EmojiCategoryIconView.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ final class EmojiCategoryIconView: UIView {
6565
/// - Parameter state: Target icon state. Based on this state, the target color will be selected.
6666
func updateIconTintColor(for state: EmojiCategoryIconViewState) {
6767
guard self.state != state else { return }
68+
6869
self.state = state
6970
switch state {
7071
case .standard:
@@ -87,7 +88,8 @@ extension EmojiCategoryIconView {
8788

8889
/// New centered rect based on bounds width to prevent stretching of the icon.
8990
let rect = CGRect(origin: CGPoint(x: 0, y: (rect.height - rect.width) / 2),
90-
size: CGSize(width: rect.width, height: rect.width))
91+
size: CGSize(width: rect.width, height: rect.width)
92+
)
9193

9294
switch type {
9395
case .people:

Sources/EmojiPicker/Views/EmojiCollectionViewCell.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ final class EmojiCollectionViewCell: UICollectionViewCell {
3737

3838
override init(frame: CGRect) {
3939
super.init(frame: frame)
40+
4041
setupSelectedBackgroundView()
4142
setupLayout()
4243
}
@@ -75,5 +76,4 @@ final class EmojiCollectionViewCell: UICollectionViewCell {
7576
selectedView.layer.cornerRadius = 8
7677
selectedBackgroundView = selectedView
7778
}
78-
7979
}

Sources/EmojiPicker/Views/EmojiPickerViewController.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ public final class EmojiPickerViewController: UIViewController {
119119
arrowDirection = configuration.arrowDirection
120120
selectedEmojiCategoryTintColor = configuration.selectedEmojiCategoryTintColor
121121
horizontalInset = configuration.horizontalInset
122-
isDismissedAfterChoosing = configuration.isDismissAfterChoosing
122+
isDismissedAfterChoosing = configuration.isDismissedAfterChoosing
123123
customHeight = configuration.customHeight
124124
feedbackGeneratorStyle = configuration.feedbackGeneratorStyle
125125

@@ -189,7 +189,8 @@ public final class EmojiPickerViewController: UIViewController {
189189
let heightProportionToWidth: CGFloat = 1.16
190190

191191
preferredContentSize = CGSize(width: popoverWidth,
192-
height: customHeight ?? popoverWidth * heightProportionToWidth)
192+
height: customHeight ?? popoverWidth * heightProportionToWidth
193+
)
193194
}
194195

195196
private func setupArrowDirections() {

0 commit comments

Comments
 (0)