From 309a4c8b54e007a57e01342a5d54b979d9c12834 Mon Sep 17 00:00:00 2001 From: Muukii Date: Wed, 3 Apr 2019 20:22:06 +0900 Subject: [PATCH] Fix warnings --- Podfile.lock | 6 +++--- StackScrollView-Demo/TextViewStackCell.swift | 4 ++-- StackScrollView.xcodeproj/project.pbxproj | 12 ------------ StackScrollView/StackScrollView.swift | 6 +++--- 4 files changed, 8 insertions(+), 20 deletions(-) diff --git a/Podfile.lock b/Podfile.lock index 25f22d5..2af4c2a 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -1,6 +1,6 @@ PODS: - EasyPeasy (1.8.0) - - Reveal-SDK (20) + - Reveal-SDK (21) DEPENDENCIES: - EasyPeasy @@ -13,8 +13,8 @@ SPEC REPOS: SPEC CHECKSUMS: EasyPeasy: bfffe5d47bbaaef3e32888c250a196768484b43a - Reveal-SDK: 43206a57f575632fd304e85385cc259b5d359e32 + Reveal-SDK: 3523e0eb7c562811c51bb71da6e523a6373702c8 PODFILE CHECKSUM: 801a5623355ad33f423fde4c805d2477d85eadb4 -COCOAPODS: 1.6.0.beta.2 +COCOAPODS: 1.6.0 diff --git a/StackScrollView-Demo/TextViewStackCell.swift b/StackScrollView-Demo/TextViewStackCell.swift index 02013e3..0686106 100644 --- a/StackScrollView-Demo/TextViewStackCell.swift +++ b/StackScrollView-Demo/TextViewStackCell.swift @@ -20,9 +20,9 @@ final class TextViewStackCell: StackCellBase, UITextViewDelegate { super.init() addSubview(textView) - textView <- Edges(UIEdgeInsets(top: 8, left: 8, bottom: 8, right: 8)) + textView.easy.layout(Edges(UIEdgeInsets(top: 8, left: 8, bottom: 8, right: 8))) - self <- Height(>=40) + self.easy.layout(Height(>=40)) textView.font = UIFont.preferredFont(forTextStyle: .body) textView.isScrollEnabled = false diff --git a/StackScrollView.xcodeproj/project.pbxproj b/StackScrollView.xcodeproj/project.pbxproj index d70e7a7..45d3e80 100644 --- a/StackScrollView.xcodeproj/project.pbxproj +++ b/StackScrollView.xcodeproj/project.pbxproj @@ -319,12 +319,10 @@ inputPaths = ( "${PODS_ROOT}/Target Support Files/Pods-StackScrollView-Demo/Pods-StackScrollView-Demo-frameworks.sh", "${BUILT_PRODUCTS_DIR}/EasyPeasy/EasyPeasy.framework", - "${PODS_ROOT}/Reveal-SDK/RevealServer-20/iOS/RevealServer.framework", ); name = "[CP] Embed Pods Frameworks"; outputPaths = ( "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/EasyPeasy.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RevealServer.framework", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; @@ -570,11 +568,6 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; DEVELOPMENT_TEAM = KU2QEJ9K3Z; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - "$(PROJECT_DIR)", - ); INFOPLIST_FILE = "StackScrollView-Demo/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "me.muukii.StackScrollView-Demo"; @@ -589,11 +582,6 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; DEVELOPMENT_TEAM = KU2QEJ9K3Z; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Carthage/Build/iOS", - "$(PROJECT_DIR)", - ); INFOPLIST_FILE = "StackScrollView-Demo/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "me.muukii.StackScrollView-Demo"; diff --git a/StackScrollView/StackScrollView.swift b/StackScrollView/StackScrollView.swift index 438bcff..fe4af95 100644 --- a/StackScrollView/StackScrollView.swift +++ b/StackScrollView/StackScrollView.swift @@ -115,7 +115,7 @@ open class StackScrollView: UICollectionView, UICollectionViewDataSource, UIColl open func remove(view: UIView, animated: Bool) { - if let index = views.index(of: view) { + if let index = views.firstIndex(of: view) { views.remove(at: index) if animated { UIView.animate( @@ -153,7 +153,7 @@ open class StackScrollView: UICollectionView, UICollectionViewDataSource, UIColl var indicesForRemove: [Int] = [] for view in views { - if let index = self.views.index(of: view) { + if let index = self.views.firstIndex(of: view) { indicesForRemove.append(index) } } @@ -199,7 +199,7 @@ open class StackScrollView: UICollectionView, UICollectionViewDataSource, UIColl } open func scroll(to view: UIView, at position: UICollectionView.ScrollPosition, animated: Bool) { - if let index = views.index(of: view) { + if let index = views.firstIndex(of: view) { scrollToItem(at: IndexPath(item: index, section: 0), at: position, animated: animated) } }