Skip to content

Commit 1cad20d

Browse files
committed
Setup layout and version number
1 parent 19addb1 commit 1cad20d

21 files changed

+28
-25
lines changed

Example/Example/ViewController.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class ViewController: UIViewController {
2323
cameraActionTitle: "Camera",
2424
gallaryActionTitle: "Gallary",
2525
cancelActionTitle: "Cancel",
26-
style: .actionSheet
26+
style: .alert
2727
)
2828

2929
pickImageAlert = PickImageAlert(with: self, alertProperties: properties)

Framework/PickImageAlert.xcodeproj/project.pbxproj

+3-3
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@
257257
CLASSPREFIX = PI;
258258
LastSwiftUpdateCheck = 1010;
259259
LastUpgradeCheck = 1010;
260-
ORGANIZATIONNAME = jlimadeveloper;
260+
ORGANIZATIONNAME = limadeveloper;
261261
TargetAttributes = {
262262
827A8AC32197A5B4002150E2 = {
263263
CreatedOnToolsVersion = 10.1;
@@ -589,7 +589,7 @@
589589
"@executable_path/Frameworks",
590590
"@loader_path/Frameworks",
591591
);
592-
PRODUCT_BUNDLE_IDENTIFIER = com.jlimadeveloper.ios.PickImageAlertTests;
592+
PRODUCT_BUNDLE_IDENTIFIER = ios.pickimagealerttests;
593593
PRODUCT_NAME = "$(TARGET_NAME)";
594594
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
595595
SWIFT_VERSION = 4.2;
@@ -609,7 +609,7 @@
609609
"@executable_path/Frameworks",
610610
"@loader_path/Frameworks",
611611
);
612-
PRODUCT_BUNDLE_IDENTIFIER = com.jlimadeveloper.ios.PickImageAlertTests;
612+
PRODUCT_BUNDLE_IDENTIFIER = ios.pickimagealerttests;
613613
PRODUCT_NAME = "$(TARGET_NAME)";
614614
SWIFT_VERSION = 4.2;
615615
TARGETED_DEVICE_FAMILY = "1,2";

Framework/PickImageAlert/Common/Extensions/NSObject+Extensions.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// PickImageAlert
44
//
55
// Created by John Lima on 10/11/18.
6-
// Copyright © 2018 jlimadeveloper. All rights reserved.
6+
// Copyright © 2018 limadeveloper. All rights reserved.
77
//
88

99
extension NSObject {

Framework/PickImageAlert/Common/Extensions/UICollectionView+Extensions.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// PickImageAlert
44
//
55
// Created by John Lima on 10/11/18.
6-
// Copyright © 2018 jlimadeveloper. All rights reserved.
6+
// Copyright © 2018 limadeveloper. All rights reserved.
77
//
88

99
import UIKit

Framework/PickImageAlert/Common/Extensions/UIDevice+Extensions.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// PickImageAlert
44
//
55
// Created by John Lima on 11/11/18.
6-
// Copyright © 2018 jlimadeveloper. All rights reserved.
6+
// Copyright © 2018 limadeveloper. All rights reserved.
77
//
88

99
import UIKit

Framework/PickImageAlert/Common/Extensions/UIView+Extensions.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// PickImageAlert
44
//
55
// Created by John Lima on 10/11/18.
6-
// Copyright © 2018 jlimadeveloper. All rights reserved.
6+
// Copyright © 2018 limadeveloper. All rights reserved.
77
//
88

99
import UIKit

Framework/PickImageAlert/Common/Localizable.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// PickImageAlert
44
//
55
// Created by John Lima on 11/11/18.
6-
// Copyright © 2018 jlimadeveloper. All rights reserved.
6+
// Copyright © 2018 limadeveloper. All rights reserved.
77
//
88

99
import Foundation

Framework/PickImageAlert/Common/PIAlertController.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// PickImageAlert
44
//
55
// Created by John Lima on 11/11/18.
6-
// Copyright © 2018 jlimadeveloper. All rights reserved.
6+
// Copyright © 2018 limadeveloper. All rights reserved.
77
//
88

99
import UIKit

Framework/PickImageAlert/Common/PICollectionImages/View/Cell/PICollectionImageCell.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// LookME
44
//
55
// Created by John Lima on 10/11/18.
6-
// Copyright © 2018 jlimadeveloper. All rights reserved.
6+
// Copyright © 2018 limadeveloper. All rights reserved.
77
//
88

99
import UIKit

Framework/PickImageAlert/Common/PICollectionImages/View/PICollectionImages.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// LookME
44
//
55
// Created by John Lima on 10/11/18.
6-
// Copyright © 2018 jlimadeveloper. All rights reserved.
6+
// Copyright © 2018 limadeveloper. All rights reserved.
77
//
88

99
import UIKit

Framework/PickImageAlert/Common/PICollectionImages/ViewModel/PICollectionImagesViewModel.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// LookME
44
//
55
// Created by John Lima on 10/11/18.
6-
// Copyright © 2018 jlimadeveloper. All rights reserved.
6+
// Copyright © 2018 limadeveloper. All rights reserved.
77
//
88

99
import Foundation

Framework/PickImageAlert/Info.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>FMWK</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>1.0</string>
18+
<string>1.0.0</string>
1919
<key>CFBundleVersion</key>
2020
<string>$(CURRENT_PROJECT_VERSION)</string>
2121
</dict>

Framework/PickImageAlert/PickImageAlert.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// PickImageAlert
44
//
55
// Created by John Lima on 10/11/18.
6-
// Copyright © 2018 jlimadeveloper. All rights reserved.
6+
// Copyright © 2018 limadeveloper. All rights reserved.
77
//
88

99
#import <UIKit/UIKit.h>

Framework/PickImageAlert/PickImageAlert.swift

+6-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// PickImageAlert
44
//
55
// Created by John Lima on 10/11/18.
6-
// Copyright © 2018 jlimadeveloper. All rights reserved.
6+
// Copyright © 2018 limadeveloper. All rights reserved.
77
//
88

99
import Photos
@@ -49,7 +49,6 @@ open class PickImageAlert: NSObject {
4949

5050
// MARK: - Constants
5151
private let alertViewHeight: CGFloat = 360
52-
private let alertActionViewHeight: CGFloat = UIDevice.current.isPad ? 44 : 57
5352

5453
// MARK: - Properties
5554
internal weak var targetController: UIViewController?
@@ -180,14 +179,18 @@ open class PickImageAlert: NSObject {
180179
alertController?.view.addConstraint(constraintHeight)
181180
}
182181

182+
private func getAlertActionViewHeight() -> CGFloat {
183+
return alertController?.preferredStyle == .alert ? 44 : 57
184+
}
185+
183186
private func setupPhotosView() {
184187
guard let alert = alertController else { return }
185188

186189
photosView?.topAnchor.constraint(equalTo: alert.view.topAnchor, constant: 45).isActive = true
187190
photosView?.rightAnchor.constraint(equalTo: alert.view.rightAnchor, constant: -10).isActive = true
188191
photosView?.leftAnchor.constraint(equalTo: alert.view.leftAnchor, constant: 10).isActive = true
189192

190-
let constraintBottomValue = (CGFloat(alert.actions.count) * alertActionViewHeight) + 16
193+
let constraintBottomValue = (CGFloat(alert.actions.count) * getAlertActionViewHeight()) + 16
191194

192195
photosView?.bottomAnchor
193196
.constraint(equalTo: alert.view.bottomAnchor, constant: -constraintBottomValue).isActive = true

Framework/PickImageAlert/en.lproj/Localizable.strings

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
PickImageAlert
44

55
Created by John Lima on 11/11/18.
6-
Copyright © 2018 jlimadeveloper. All rights reserved.
6+
Copyright © 2018 limadeveloper. All rights reserved.
77
*/
88

99
"error.title" = "Error";

Framework/PickImageAlertTests/Common/ExtensionTests.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// PickImageAlertTests
44
//
55
// Created by John Lima on 12/11/18.
6-
// Copyright © 2018 jlimadeveloper. All rights reserved.
6+
// Copyright © 2018 limadeveloper. All rights reserved.
77
//
88

99
@testable import PickImageAlert

Framework/PickImageAlertTests/Common/LocalizableTests.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// PickImageAlertTests
44
//
55
// Created by John Lima on 11/11/18.
6-
// Copyright © 2018 jlimadeveloper. All rights reserved.
6+
// Copyright © 2018 limadeveloper. All rights reserved.
77
//
88

99
@testable import PickImageAlert

Framework/PickImageAlertTests/Common/PIAlertControllerTests.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// PickImageAlertTests
44
//
55
// Created by John Lima on 11/11/18.
6-
// Copyright © 2018 jlimadeveloper. All rights reserved.
6+
// Copyright © 2018 limadeveloper. All rights reserved.
77
//
88

99
@testable import PickImageAlert

Framework/PickImageAlertTests/Common/PICollectionImagesTests.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// PickImageAlertTests
44
//
55
// Created by John Lima on 11/11/18.
6-
// Copyright © 2018 jlimadeveloper. All rights reserved.
6+
// Copyright © 2018 limadeveloper. All rights reserved.
77
//
88

99
@testable import PickImageAlert

Framework/PickImageAlertTests/MockViewController.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// PickImageAlertTests
44
//
55
// Created by John Lima on 12/11/18.
6-
// Copyright © 2018 jlimadeveloper. All rights reserved.
6+
// Copyright © 2018 limadeveloper. All rights reserved.
77
//
88

99
import UIKit

Framework/PickImageAlertTests/PickImageAlertTests.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// PickImageAlertTests
44
//
55
// Created by John Lima on 12/11/18.
6-
// Copyright © 2018 jlimadeveloper. All rights reserved.
6+
// Copyright © 2018 limadeveloper. All rights reserved.
77
//
88

99
@testable import PickImageAlert

0 commit comments

Comments
 (0)