Skip to content

Commit a5abea1

Browse files
anonrigcci-rmirza
authored andcommitted
fix(dependencies): update dependencies and remove macOS support
1 parent 3bf9d6c commit a5abea1

6 files changed

Lines changed: 27 additions & 24 deletions

File tree

Package.resolved

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

Package.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import PackageDescription
55

66
let rxDependencies: [Package.Dependency] = [
77
.package(url: "https://github.com/rxswiftcommunity/rxflow", from: "2.7.0"),
8-
.package(url: "https://github.com/sunshinejr/Moya-ModelMapper", .branch("master")),
8+
.package(url: "https://github.com/sunshinejr/Moya-ModelMapper", from: "10.0.0"),
99
.package(url: "https://github.com/RxSwiftCommunity/RxRealm", from: "2.0.0"),
1010
.package(url: "https://github.com/RxSwiftCommunity/RxDataSources", from: "4.0.1"),
1111
.package(url: "https://github.com/RxSwiftCommunity/RxGesture", from: "3.0.3")
@@ -14,7 +14,6 @@ let rxDependencies: [Package.Dependency] = [
1414
let package = Package(
1515
name: "Toolkit",
1616
platforms: [
17-
.macOS(.v10_12),
1817
.iOS(.v12),
1918
.tvOS(.v10),
2019
.watchOS(.v3)

Sources/Extensions/UIView+Extensions.swift

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@ import UIKit
1111
import SnapKit
1212

1313
public extension UIView {
14-
public static func container(_ insertedView: UIView,
15-
centerHorizontally: Bool = false,
16-
centerVertically: Bool = false,
17-
insets: UIEdgeInsets = .init()) -> UIView {
14+
15+
static func container(_ insertedView: UIView,
16+
centerHorizontally: Bool = false,
17+
centerVertically: Bool = false,
18+
insets: UIEdgeInsets = .init()) -> UIView {
19+
1820
let view = UIView()
1921
view.addSubview(insertedView)
2022
insertedView.snp.makeConstraints {

Sources/RxSwift/ReachabilityService.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public enum ReachabilityServiceError: Error {
3535
case failedToCreate
3636
}
3737

38-
public class DefaultReachabilityService: HasReachabilityService {
38+
public final class DefaultReachabilityService: HasReachabilityService {
3939
private let _reachabilitySubject: BehaviorSubject<ReachabilityStatus>
4040

4141
public var reachability: Observable<ReachabilityStatus> {

Sources/Shared/PaddingLabel.swift

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import UIKit
99

10-
public class PaddingLabel: UILabel {
10+
public final class PaddingLabel: UILabel {
1111
private struct AssociatedKeys {
1212
static var padding = UIEdgeInsets()
1313
}
@@ -23,15 +23,15 @@ public class PaddingLabel: UILabel {
2323
}
2424
}
2525

26-
override open func draw(_ rect: CGRect) {
26+
public override func draw(_ rect: CGRect) {
2727
if let insets = padding {
2828
self.drawText(in: rect.inset(by: insets))
2929
} else {
3030
self.drawText(in: rect)
3131
}
3232
}
3333

34-
override open var intrinsicContentSize: CGSize {
34+
public override var intrinsicContentSize: CGSize {
3535
guard let text = self.text else { return super.intrinsicContentSize }
3636

3737
var contentSize = super.intrinsicContentSize
@@ -45,9 +45,11 @@ public class PaddingLabel: UILabel {
4545
textWidth -= insetsWidth
4646
}
4747

48+
let customFont: UIFont = font ?? .systemFont(ofSize: 16, weight: .regular)
4849
let newSize = text.boundingRect(with: CGSize(width: textWidth, height: CGFloat.greatestFiniteMagnitude),
4950
options: NSStringDrawingOptions.usesLineFragmentOrigin,
50-
attributes: [NSAttributedString.Key.font: self.font ?? UIFont.systemFont(ofSize: 16, weight: .regular)], context: nil)
51+
attributes: [.font: customFont],
52+
context: nil)
5153

5254
contentSize.height = ceil(newSize.size.height) + insetsHeight
5355
contentSize.width = ceil(newSize.size.width) + insetsWidth

Sources/Shared/RoundImageView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import UIKit
99

10-
public class RoundImageView: UIImageView {
10+
public final class RoundImageView: UIImageView {
1111
public override func layoutSubviews() {
1212
super.layoutSubviews()
1313
self.layer.cornerRadius = self.bounds.size.width / 2.0

0 commit comments

Comments
 (0)