Skip to content

Commit

Permalink
fix(dependencies): update dependencies and remove macOS support
Browse files Browse the repository at this point in the history
  • Loading branch information
anonrig authored and cci-rmirza committed Jul 16, 2020
1 parent 3bf9d6c commit a5abea1
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 24 deletions.
24 changes: 12 additions & 12 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"repositoryURL": "https://github.com/Alamofire/Alamofire.git",
"state": {
"branch": null,
"revision": "fca036f7aeca07124067cb6e0c12b0ad6359e3d4",
"version": "5.1.0"
"revision": "2777659076fda38bd4e487739ee331c7a65b5924",
"version": "5.2.1"
}
},
{
Expand Down Expand Up @@ -42,8 +42,8 @@
"repositoryURL": "https://github.com/airbnb/lottie-ios",
"state": {
"branch": null,
"revision": "8f81de8d81da8631fd95ff81a9db133b76e13ea4",
"version": "3.1.6"
"revision": "4e5877425dae5c10792fc9d22d53dc6bf6824dc1",
"version": "3.1.8"
}
},
{
Expand All @@ -68,9 +68,9 @@
"package": "Moya-ModelMapper",
"repositoryURL": "https://github.com/sunshinejr/Moya-ModelMapper",
"state": {
"branch": "master",
"branch": null,
"revision": "3f0b7d953bedd2c61570bec7110fb30b720f028b",
"version": null
"version": "10.0.0"
}
},
{
Expand All @@ -96,8 +96,8 @@
"repositoryURL": "https://github.com/realm/realm-cocoa.git",
"state": {
"branch": null,
"revision": "07734d6ee4b49b5656c51dab51c20a2d59b9de45",
"version": "4.4.0"
"revision": "fa43b8e2909334c79f233ce472332c136ca108da",
"version": "4.4.1"
}
},
{
Expand Down Expand Up @@ -132,8 +132,8 @@
"repositoryURL": "https://github.com/rxswiftcommunity/rxflow",
"state": {
"branch": null,
"revision": "16e63a1d10f1e9de2393d4ec984deb5f53a9e8ee",
"version": "2.7.0"
"revision": "31557fa4a216387134c93db14130dfc45574b67d",
"version": "2.9.0"
}
},
{
Expand Down Expand Up @@ -177,8 +177,8 @@
"repositoryURL": "https://github.com/bizz84/SwiftyStoreKit",
"state": {
"branch": null,
"revision": "6de7077c6cd15435c53d8ecfb1a09a371c83c4df",
"version": "0.15.1"
"revision": "a45217b2cf7c9bfea3139dc45afa06ca9cf6c4e6",
"version": "0.16.0"
}
}
]
Expand Down
3 changes: 1 addition & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import PackageDescription

let rxDependencies: [Package.Dependency] = [
.package(url: "https://github.com/rxswiftcommunity/rxflow", from: "2.7.0"),
.package(url: "https://github.com/sunshinejr/Moya-ModelMapper", .branch("master")),
.package(url: "https://github.com/sunshinejr/Moya-ModelMapper", from: "10.0.0"),
.package(url: "https://github.com/RxSwiftCommunity/RxRealm", from: "2.0.0"),
.package(url: "https://github.com/RxSwiftCommunity/RxDataSources", from: "4.0.1"),
.package(url: "https://github.com/RxSwiftCommunity/RxGesture", from: "3.0.3")
Expand All @@ -14,7 +14,6 @@ let rxDependencies: [Package.Dependency] = [
let package = Package(
name: "Toolkit",
platforms: [
.macOS(.v10_12),
.iOS(.v12),
.tvOS(.v10),
.watchOS(.v3)
Expand Down
10 changes: 6 additions & 4 deletions Sources/Extensions/UIView+Extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ import UIKit
import SnapKit

public extension UIView {
public static func container(_ insertedView: UIView,
centerHorizontally: Bool = false,
centerVertically: Bool = false,
insets: UIEdgeInsets = .init()) -> UIView {

static func container(_ insertedView: UIView,
centerHorizontally: Bool = false,
centerVertically: Bool = false,
insets: UIEdgeInsets = .init()) -> UIView {

let view = UIView()
view.addSubview(insertedView)
insertedView.snp.makeConstraints {
Expand Down
2 changes: 1 addition & 1 deletion Sources/RxSwift/ReachabilityService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public enum ReachabilityServiceError: Error {
case failedToCreate
}

public class DefaultReachabilityService: HasReachabilityService {
public final class DefaultReachabilityService: HasReachabilityService {
private let _reachabilitySubject: BehaviorSubject<ReachabilityStatus>

public var reachability: Observable<ReachabilityStatus> {
Expand Down
10 changes: 6 additions & 4 deletions Sources/Shared/PaddingLabel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import UIKit

public class PaddingLabel: UILabel {
public final class PaddingLabel: UILabel {
private struct AssociatedKeys {
static var padding = UIEdgeInsets()
}
Expand All @@ -23,15 +23,15 @@ public class PaddingLabel: UILabel {
}
}

override open func draw(_ rect: CGRect) {
public override func draw(_ rect: CGRect) {
if let insets = padding {
self.drawText(in: rect.inset(by: insets))
} else {
self.drawText(in: rect)
}
}

override open var intrinsicContentSize: CGSize {
public override var intrinsicContentSize: CGSize {
guard let text = self.text else { return super.intrinsicContentSize }

var contentSize = super.intrinsicContentSize
Expand All @@ -45,9 +45,11 @@ public class PaddingLabel: UILabel {
textWidth -= insetsWidth
}

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

contentSize.height = ceil(newSize.size.height) + insetsHeight
contentSize.width = ceil(newSize.size.width) + insetsWidth
Expand Down
2 changes: 1 addition & 1 deletion Sources/Shared/RoundImageView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import UIKit

public class RoundImageView: UIImageView {
public final class RoundImageView: UIImageView {
public override func layoutSubviews() {
super.layoutSubviews()
self.layer.cornerRadius = self.bounds.size.width / 2.0
Expand Down

0 comments on commit a5abea1

Please sign in to comment.