diff --git a/Package.swift b/Package.swift index 8fafd6d44..2f065be47 100644 --- a/Package.swift +++ b/Package.swift @@ -14,7 +14,7 @@ let package = Package( dependencies: [ .package( url: "https://github.com/freshOS/Stevia", - .exact("4.8.0") + .exact("5.1.2") ), .package( url: "https://github.com/HHK1/PryntTrimmerView", diff --git a/Podfile b/Podfile index 79fdd390c..3372dae97 100644 --- a/Podfile +++ b/Podfile @@ -5,7 +5,7 @@ use_frameworks! target 'Example' do # Pods for YPImagePickerExample - pod 'SteviaLayout', '= 4.7.3' + pod 'SteviaLayout', '= 5.1.2' pod 'PryntTrimmerView', '= 4.0.2' end diff --git a/Source/Filters/Crop/YPCropView.swift b/Source/Filters/Crop/YPCropView.swift index cb971dddc..b8bb86b18 100644 --- a/Source/Filters/Crop/YPCropView.swift +++ b/Source/Filters/Crop/YPCropView.swift @@ -53,8 +53,8 @@ final class YPCropView: UIView { private func setupViewHierarchy() { - sv( - containerView.sv( + subviews( + containerView.subviews( imageView, topCurtain, leadingCurtain, diff --git a/Source/Filters/Photo/YPFilterCollectionViewCell.swift b/Source/Filters/Photo/YPFilterCollectionViewCell.swift index c532877f1..b3d377329 100644 --- a/Source/Filters/Photo/YPFilterCollectionViewCell.swift +++ b/Source/Filters/Photo/YPFilterCollectionViewCell.swift @@ -36,7 +36,7 @@ final class YPFilterCollectionViewCell: UICollectionViewCell { override init(frame: CGRect) { super.init(frame: frame) - sv( + subviews( name, imageView ) diff --git a/Source/Filters/Photo/YPFiltersView.swift b/Source/Filters/Photo/YPFiltersView.swift index d5f37b254..da1337c7c 100644 --- a/Source/Filters/Photo/YPFiltersView.swift +++ b/Source/Filters/Photo/YPFiltersView.swift @@ -24,9 +24,9 @@ class YPFiltersView: UIView { filtersLoader.startAnimating() filtersLoader.color = YPConfig.colors.tintColor - sv( + subviews( imageView, - collectionViewContainer.sv( + collectionViewContainer.subviews( filtersLoader, collectionView ) diff --git a/Source/Filters/Video/YPVideoFiltersVC.swift b/Source/Filters/Video/YPVideoFiltersVC.swift index b302b7224..2e2c8e3a9 100644 --- a/Source/Filters/Video/YPVideoFiltersVC.swift +++ b/Source/Filters/Video/YPVideoFiltersVC.swift @@ -54,13 +54,13 @@ public final class YPVideoFiltersVC: UIViewController, IsMediaFilterVC { v.isHidden = true return v }() - private let trimBottomItem: YPMenuItem = { + private lazy var trimBottomItem: YPMenuItem = { let v = YPMenuItem() v.textLabel.text = YPConfig.wordings.trim v.button.addTarget(self, action: #selector(selectTrim), for: .touchUpInside) return v }() - private let coverBottomItem: YPMenuItem = { + private lazy var coverBottomItem: YPMenuItem = { let v = YPMenuItem() v.textLabel.text = YPConfig.wordings.cover v.button.addTarget(self, action: #selector(selectCover), for: .touchUpInside) @@ -147,12 +147,12 @@ public final class YPVideoFiltersVC: UIViewController, IsMediaFilterVC { } private func setupLayout() { - view.sv( + view.subviews( trimBottomItem, coverBottomItem, videoView, coverImageView, - trimmerContainerView.sv( + trimmerContainerView.subviews( trimmerView, coverThumbSelectorView ) @@ -174,7 +174,7 @@ public final class YPVideoFiltersVC: UIViewController, IsMediaFilterVC { trimmerContainerView.Top == videoView.Bottom trimmerContainerView.Bottom == trimBottomItem.Top - trimmerView.fillHorizontally(m: 30).centerVertically() + trimmerView.fillHorizontally(padding: 30).centerVertically() trimmerView.Height == trimmerContainerView.Height / 3 coverThumbSelectorView.followEdges(trimmerView) diff --git a/Source/Filters/Video/YPVideoView.swift b/Source/Filters/Video/YPVideoView.swift index 476f5aced..01d215136 100644 --- a/Source/Filters/Video/YPVideoView.swift +++ b/Source/Filters/Video/YPVideoView.swift @@ -49,7 +49,7 @@ public class YPVideoView: UIView { playerLayer.videoGravity = .resizeAspect previewImageView.contentMode = .scaleAspectFit - sv( + subviews( previewImageView, playerView, playImageView diff --git a/Source/Helpers/YPLoadingView.swift b/Source/Helpers/YPLoadingView.swift index 55048bcec..15dafbb59 100644 --- a/Source/Helpers/YPLoadingView.swift +++ b/Source/Helpers/YPLoadingView.swift @@ -21,7 +21,7 @@ class YPLoadingView: UIView { let stack = UIStackView(arrangedSubviews: [spinner, processingLabel]) stack.axis = .vertical stack.spacing = 20 - sv( + subviews( stack ) diff --git a/Source/Pages/Gallery/Album/YPAlbumCell.swift b/Source/Pages/Gallery/Album/YPAlbumCell.swift index 602e868e0..d72976a41 100644 --- a/Source/Pages/Gallery/Album/YPAlbumCell.swift +++ b/Source/Pages/Gallery/Album/YPAlbumCell.swift @@ -25,7 +25,7 @@ class YPAlbumCell: UITableViewCell { stackView.addArrangedSubview(title) stackView.addArrangedSubview(numberOfItems) - sv( + subviews( thumbnail, stackView ) diff --git a/Source/Pages/Gallery/Album/YPAlbumView.swift b/Source/Pages/Gallery/Album/YPAlbumView.swift index 50b069c43..499e8151d 100644 --- a/Source/Pages/Gallery/Album/YPAlbumView.swift +++ b/Source/Pages/Gallery/Album/YPAlbumView.swift @@ -17,7 +17,7 @@ class YPAlbumView: UIView { convenience init() { self.init(frame: .zero) - sv( + subviews( tableView, spinner ) diff --git a/Source/Pages/Gallery/BottomPager/YPBottomPager.swift b/Source/Pages/Gallery/BottomPager/YPBottomPager.swift index 7b1bbd729..408da9977 100644 --- a/Source/Pages/Gallery/BottomPager/YPBottomPager.swift +++ b/Source/Pages/Gallery/BottomPager/YPBottomPager.swift @@ -55,7 +55,7 @@ open class YPBottomPager: UIViewController, UIScrollViewDelegate { c.willMove(toParent: self) addChild(c) let x: CGFloat = CGFloat(index) * viewWidth - v.scrollView.sv(c.view) + v.scrollView.subviews(c.view) c.didMove(toParent: self) c.view.left(x) c.view.top(0) diff --git a/Source/Pages/Gallery/BottomPager/YPBottomPagerView.swift b/Source/Pages/Gallery/BottomPager/YPBottomPagerView.swift index 825979387..a840e41c1 100644 --- a/Source/Pages/Gallery/BottomPager/YPBottomPagerView.swift +++ b/Source/Pages/Gallery/BottomPager/YPBottomPagerView.swift @@ -18,7 +18,7 @@ final class YPBottomPagerView: UIView { self.init(frame: .zero) backgroundColor = .offWhiteOrBlack - sv( + subviews( scrollView, header ) diff --git a/Source/Pages/Gallery/BottomPager/YPMenuItem.swift b/Source/Pages/Gallery/BottomPager/YPMenuItem.swift index fe2ee31f3..666bf161d 100644 --- a/Source/Pages/Gallery/BottomPager/YPMenuItem.swift +++ b/Source/Pages/Gallery/BottomPager/YPMenuItem.swift @@ -31,7 +31,7 @@ final class YPMenuItem: UIView { func setup() { backgroundColor = YPImagePickerConfiguration.shared.colors.bottomMenuItemBackgroundColor - sv( + subviews( textLabel, button ) diff --git a/Source/Pages/Gallery/BottomPager/YPPagerMenu.swift b/Source/Pages/Gallery/BottomPager/YPPagerMenu.swift index 121add8c3..7ec6ff943 100644 --- a/Source/Pages/Gallery/BottomPager/YPPagerMenu.swift +++ b/Source/Pages/Gallery/BottomPager/YPPagerMenu.swift @@ -27,7 +27,7 @@ final class YPPagerMenu: UIView { let menuItemWidth: CGFloat = screenWidth / CGFloat(menuItems.count) var previousMenuItem: YPMenuItem? for m in menuItems { - sv( + subviews( m ) diff --git a/Source/Pages/Gallery/YPAssetViewContainer.swift b/Source/Pages/Gallery/YPAssetViewContainer.swift index 245a6d2c8..832d49b2f 100644 --- a/Source/Pages/Gallery/YPAssetViewContainer.swift +++ b/Source/Pages/Gallery/YPAssetViewContainer.swift @@ -62,8 +62,8 @@ final class YPAssetViewContainer: UIView { // TODO: Add tap gesture to play/pause. Add double tap gesture to square/unsquare - sv( - spinnerView.sv( + subviews( + spinnerView.subviews( spinner ), curtain @@ -81,14 +81,14 @@ final class YPAssetViewContainer: UIView { if !onlySquare { // Crop Button squareCropButton.setImage(YPConfig.icons.cropIcon, for: .normal) - sv(squareCropButton) + subviews(squareCropButton) squareCropButton.size(42) |-15-squareCropButton squareCropButton.Bottom == self.Bottom - 15 } // Multiple selection button - sv(multipleSelectionButton) + subviews(multipleSelectionButton) multipleSelectionButton.size(42).trailing(15) multipleSelectionButton.Bottom == self.Bottom - 15 } diff --git a/Source/Pages/Gallery/YPGridView.swift b/Source/Pages/Gallery/YPGridView.swift index ad8362d8e..06428baff 100644 --- a/Source/Pages/Gallery/YPGridView.swift +++ b/Source/Pages/Gallery/YPGridView.swift @@ -25,7 +25,7 @@ final class YPGridView: UIView { convenience init() { self.init(frame: .zero) isUserInteractionEnabled = false - sv( + subviews( line1, line2, line3, diff --git a/Source/Pages/Gallery/YPLibraryView.swift b/Source/Pages/Gallery/YPLibraryView.swift index d3401236d..d42db8866 100644 --- a/Source/Pages/Gallery/YPLibraryView.swift +++ b/Source/Pages/Gallery/YPLibraryView.swift @@ -167,16 +167,16 @@ internal final class YPLibraryView: UIView { // MARK: - Private Methods private func setupLayout() { - sv( - collectionContainerView.sv( + subviews( + collectionContainerView.subviews( collectionView ), line, - assetViewContainer.sv( + assetViewContainer.subviews( assetZoomableView ), progressView, - maxNumberWarningView.sv( + maxNumberWarningView.subviews( maxNumberWarningLabel ) ) diff --git a/Source/Pages/Gallery/YPLibraryViewCell.swift b/Source/Pages/Gallery/YPLibraryViewCell.swift index a4ae4d47f..42fe553a6 100644 --- a/Source/Pages/Gallery/YPLibraryViewCell.swift +++ b/Source/Pages/Gallery/YPLibraryViewCell.swift @@ -20,7 +20,7 @@ class YPMultipleSelectionIndicator: UIView { let size: CGFloat = 20 - sv( + subviews( circle, label ) @@ -65,7 +65,7 @@ class YPLibraryViewCell: UICollectionViewCell { override init(frame: CGRect) { super.init(frame: frame) - sv( + subviews( imageView, durationLabel, selectionOverlay, diff --git a/Source/Pages/Photo/YPCameraView.swift b/Source/Pages/Photo/YPCameraView.swift index e169ce1c7..451e7240f 100644 --- a/Source/Pages/Photo/YPCameraView.swift +++ b/Source/Pages/Photo/YPCameraView.swift @@ -24,26 +24,26 @@ internal class YPCameraView: UIView, UIGestureRecognizerDelegate { if let overlayView = overlayView { // View Hierarchy - sv( + subviews( previewViewContainer, overlayView, progressBar, timeElapsedLabel, flashButton, flipButton, - buttonsContainer.sv( + buttonsContainer.subviews( shotButton ) ) } else { // View Hierarchy - sv( + subviews( previewViewContainer, progressBar, timeElapsedLabel, flashButton, flipButton, - buttonsContainer.sv( + buttonsContainer.subviews( shotButton ) ) diff --git a/Source/SelectionsGallery/YPSelectionsGalleryCell.swift b/Source/SelectionsGallery/YPSelectionsGalleryCell.swift index b0c8a224e..3f478da8b 100644 --- a/Source/SelectionsGallery/YPSelectionsGalleryCell.swift +++ b/Source/SelectionsGallery/YPSelectionsGalleryCell.swift @@ -24,7 +24,7 @@ public class YPSelectionsGalleryCell: UICollectionViewCell { override init(frame: CGRect) { super.init(frame: frame) - sv( + subviews( imageView, editIcon, editSquare, diff --git a/Source/SelectionsGallery/YPSelectionsGalleryView.swift b/Source/SelectionsGallery/YPSelectionsGalleryView.swift index 125dda22f..3a66ec1eb 100644 --- a/Source/SelectionsGallery/YPSelectionsGalleryView.swift +++ b/Source/SelectionsGallery/YPSelectionsGalleryView.swift @@ -16,7 +16,7 @@ class YPSelectionsGalleryView: UIView { convenience init() { self.init(frame: .zero) - sv( + subviews( collectionView ) diff --git a/Source/YPImagePicker.swift b/Source/YPImagePicker.swift index 409b4ce84..37dc79758 100644 --- a/Source/YPImagePicker.swift +++ b/Source/YPImagePicker.swift @@ -161,7 +161,7 @@ open class YPImagePicker: UINavigationController { } private func setupLoadingView() { - view.sv( + view.subviews( loadingView ) loadingView.fillContainer() diff --git a/Source/YPPickerVC.swift b/Source/YPPickerVC.swift index edf2da290..64f361ff9 100644 --- a/Source/YPPickerVC.swift +++ b/Source/YPPickerVC.swift @@ -232,7 +232,7 @@ open class YPPickerVC: YPBottomPager, YPBottomPagerDelegate { } if YPConfig.library.options != nil { - titleView.sv( + titleView.subviews( label ) |-(>=8)-label.centerHorizontally()-(>=8)-| @@ -253,7 +253,7 @@ open class YPPickerVC: YPBottomPager, YPBottomPagerDelegate { button.addTarget(self, action: #selector(navBarTapped), for: .touchUpInside) button.setBackgroundColor(UIColor.white.withAlphaComponent(0.5), forState: .highlighted) - titleView.sv( + titleView.subviews( label, arrow, button diff --git a/YPImagePicker.podspec b/YPImagePicker.podspec index 25f2f4310..df06a95b3 100644 --- a/YPImagePicker.podspec +++ b/YPImagePicker.podspec @@ -11,7 +11,7 @@ Pod::Spec.new do |s| :tag => s.version.to_s } s.ios.deployment_target = "12.0" s.source_files = 'Source/**/*.swift' - s.dependency 'SteviaLayout', '= 4.7.3' + s.dependency 'SteviaLayout', '= 5.1.2' s.dependency 'PryntTrimmerView', '= 4.0.2' s.resources = ['Source/Resources/*', 'Source/**/*.xib'] s.description = "Instagram-like image picker & filters for iOS supporting videos and albums" diff --git a/YPImagePicker.xcodeproj/project.pbxproj b/YPImagePicker.xcodeproj/project.pbxproj index 947dfc2eb..88b6475ec 100644 --- a/YPImagePicker.xcodeproj/project.pbxproj +++ b/YPImagePicker.xcodeproj/project.pbxproj @@ -1387,7 +1387,7 @@ repositoryURL = "https://github.com/freshOS/Stevia"; requirement = { kind = exactVersion; - version = 4.8.0; + version = 5.1.2; }; }; EBA37BCE26F75C67005DAAD4 /* XCRemoteSwiftPackageReference "PryntTrimmerView" */ = { diff --git a/YPImagePicker.xcworkspace/xcshareddata/swiftpm/Package.resolved b/YPImagePicker.xcworkspace/xcshareddata/swiftpm/Package.resolved index 04d119d60..278c37f40 100644 --- a/YPImagePicker.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/YPImagePicker.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -1,25 +1,23 @@ { - "object": { - "pins": [ - { - "package": "PryntTrimmerView", - "repositoryURL": "https://github.com/HHK1/PryntTrimmerView", - "state": { - "branch": null, - "revision": "ac1b60a22c7e6a6514de7a66d2f3d5b537c956d5", - "version": "4.0.2" - } - }, - { - "package": "Stevia", - "repositoryURL": "https://github.com/freshOS/Stevia", - "state": { - "branch": null, - "revision": "87dd17a86240f16788239a78dd8be11c4b013150", - "version": "4.8.0" - } + "pins" : [ + { + "identity" : "prynttrimmerview", + "kind" : "remoteSourceControl", + "location" : "https://github.com/HHK1/PryntTrimmerView", + "state" : { + "revision" : "ac1b60a22c7e6a6514de7a66d2f3d5b537c956d5", + "version" : "4.0.2" } - ] - }, - "version": 1 + }, + { + "identity" : "stevia", + "kind" : "remoteSourceControl", + "location" : "https://github.com/freshOS/Stevia", + "state" : { + "revision" : "cfb1a1d2159277bb553c3dc46f3f742c0275566d", + "version" : "5.1.2" + } + } + ], + "version" : 2 }