Skip to content
This repository was archived by the owner on Jan 6, 2024. It is now read-only.

Commit 6c77943

Browse files
committed
Fix warning
1 parent 1331742 commit 6c77943

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

GBHFacebookImagePicker/Classes/View/GBHSelectedView.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,7 @@ final class GBHSelectedView: UIView {
6969
}
7070

7171
// Add checkmark image view
72-
if let checkView = self.checkMarkView {
73-
self.prepareCheckMarkView()
74-
}
72+
self.prepareCheckMarkView()
7573

7674
// Apply checkmark constraint
7775
self.prepareConstraint()
@@ -164,6 +162,7 @@ final class GBHSelectedView: UIView {
164162
}
165163

166164
fileprivate func applyVerticalConstraints(margin: CGFloat) {
165+
guard let checkMarkView = self.checkMarkView else { return }
167166
switch GBHFacebookImagePicker.pickerConfig.uiConfig.placeCheckView {
168167
case .topLeft, .topRight:
169168
self.addConstraint(NSLayoutConstraint(item: checkMarkView,
@@ -185,6 +184,7 @@ final class GBHSelectedView: UIView {
185184
}
186185

187186
fileprivate func applyHorizontalConstraints(margin: CGFloat) {
187+
guard let checkMarkView = self.checkMarkView else { return }
188188
switch GBHFacebookImagePicker.pickerConfig.uiConfig.placeCheckView {
189189
case .topLeft, .bottomLeft:
190190
self.addConstraint(NSLayoutConstraint(item: checkMarkView,

Utils/UIView+Extensions.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import UIKit
1010
extension UIView {
1111

1212
/// Add layout constraint to the passed view to fit the view
13-
func fit(view: UIView) {
13+
public func fit(view: UIView) {
1414
// Top constraint
1515
self.addConstraint(NSLayoutConstraint(item: view,
1616
attribute: NSLayoutAttribute.top,

0 commit comments

Comments
 (0)