From 186852374feffd871196f7db01f1f323a483842a Mon Sep 17 00:00:00 2001 From: Evgenii Elchev Date: Thu, 20 Sep 2018 12:17:52 +0300 Subject: [PATCH] =?UTF-8?q?Revert=20"=D0=92=D1=8B=D0=BF=D0=BE=D0=BB=D0=BD?= =?UTF-8?q?=D0=B5=D0=BD=20=D0=BF=D0=B5=D1=80=D0=B5=D1=85=D0=BE=D0=B4=20?= =?UTF-8?q?=D0=BD=D0=B0=20swift=204.2"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit e1ab80365ed75adea1f6607c975d9a5386bcd989 --- .../RMRPullToRefreshBaseMessageView.swift | 20 +-- .../Default/RMRPullToRefreshBaseView.swift | 16 +-- Classes/RMRPullToRefreshContainerView.swift | 12 +- Classes/RMRPullToRefreshController.swift | 81 ++++++----- Example/RMRPullToRefresh/AppDelegate.swift | 2 +- .../Base.lproj/Main.storyboard | 130 +++++++++--------- Example/RMRPullToRefresh/ViewController.swift | 20 ++- .../project.pbxproj | 62 ++++----- RMRPullToRefresh.podspec | 4 +- 9 files changed, 165 insertions(+), 182 deletions(-) diff --git a/Classes/Default/RMRPullToRefreshBaseMessageView.swift b/Classes/Default/RMRPullToRefreshBaseMessageView.swift index ea05a16..d24b30a 100755 --- a/Classes/Default/RMRPullToRefreshBaseMessageView.swift +++ b/Classes/Default/RMRPullToRefreshBaseMessageView.swift @@ -39,10 +39,10 @@ class RMRPullToRefreshBaseMessageView: RMRPullToRefreshBaseView { messageView.addSubview(label) label.translatesAutoresizingMaskIntoConstraints = false - for attribute in [NSLayoutConstraint.Attribute.top, NSLayoutConstraint.Attribute.right, NSLayoutConstraint.Attribute.left, NSLayoutConstraint.Attribute.bottom] { + for attribute in [NSLayoutAttribute.top, NSLayoutAttribute.right, NSLayoutAttribute.left, NSLayoutAttribute.bottom] { messageView.addConstraint(NSLayoutConstraint(item: label, attribute: attribute, - relatedBy: NSLayoutConstraint.Relation.equal, + relatedBy: NSLayoutRelation.equal, toItem: messageView, attribute: attribute, multiplier: 1, @@ -58,18 +58,18 @@ class RMRPullToRefreshBaseMessageView: RMRPullToRefreshBaseView { messageView.translatesAutoresizingMaskIntoConstraints = false let heightConstraint = NSLayoutConstraint(item: messageView, - attribute: NSLayoutConstraint.Attribute.height, - relatedBy: NSLayoutConstraint.Relation.equal, + attribute: NSLayoutAttribute.height, + relatedBy: NSLayoutRelation.equal, toItem: nil, - attribute: NSLayoutConstraint.Attribute.notAnAttribute, + attribute: NSLayoutAttribute.notAnAttribute, multiplier: 1, constant: 30) let widthConstraint = NSLayoutConstraint(item: messageView, - attribute: NSLayoutConstraint.Attribute.width, - relatedBy: NSLayoutConstraint.Relation.equal, + attribute: NSLayoutAttribute.width, + relatedBy: NSLayoutRelation.equal, toItem: nil, - attribute: NSLayoutConstraint.Attribute.notAnAttribute, + attribute: NSLayoutAttribute.notAnAttribute, multiplier: 1, constant: 150) @@ -77,7 +77,7 @@ class RMRPullToRefreshBaseMessageView: RMRPullToRefreshBaseView { let verticalConstraint = NSLayoutConstraint(item: messageView, attribute: .centerY, - relatedBy: NSLayoutConstraint.Relation.equal, + relatedBy: NSLayoutRelation.equal, toItem: self, attribute: .centerY, multiplier: 1, @@ -85,7 +85,7 @@ class RMRPullToRefreshBaseMessageView: RMRPullToRefreshBaseView { let leftConstraint = NSLayoutConstraint(item: messageView, attribute: .left, - relatedBy: NSLayoutConstraint.Relation.equal, + relatedBy: NSLayoutRelation.equal, toItem: self, attribute: .right, multiplier: 1, diff --git a/Classes/Default/RMRPullToRefreshBaseView.swift b/Classes/Default/RMRPullToRefreshBaseView.swift index cad3cc8..af3837e 100755 --- a/Classes/Default/RMRPullToRefreshBaseView.swift +++ b/Classes/Default/RMRPullToRefreshBaseView.swift @@ -45,18 +45,18 @@ class RMRPullToRefreshBaseView: RMRPullToRefreshView { func configureConstraints() { logoImageView.translatesAutoresizingMaskIntoConstraints = false let heightConstraint = NSLayoutConstraint(item: logoImageView, - attribute: NSLayoutConstraint.Attribute.height, - relatedBy: NSLayoutConstraint.Relation.equal, + attribute: NSLayoutAttribute.height, + relatedBy: NSLayoutRelation.equal, toItem: nil, - attribute: NSLayoutConstraint.Attribute.notAnAttribute, + attribute: NSLayoutAttribute.notAnAttribute, multiplier: 1, constant: 50) let widthConstraint = NSLayoutConstraint(item: logoImageView, - attribute: NSLayoutConstraint.Attribute.width, - relatedBy: NSLayoutConstraint.Relation.equal, + attribute: NSLayoutAttribute.width, + relatedBy: NSLayoutRelation.equal, toItem: nil, - attribute: NSLayoutConstraint.Attribute.notAnAttribute, + attribute: NSLayoutAttribute.notAnAttribute, multiplier: 1, constant: 50) @@ -64,7 +64,7 @@ class RMRPullToRefreshBaseView: RMRPullToRefreshView { let verticalConstraint = NSLayoutConstraint(item: logoImageView, attribute: .centerY, - relatedBy: NSLayoutConstraint.Relation.equal, + relatedBy: NSLayoutRelation.equal, toItem: self, attribute: .centerY, multiplier: 1, @@ -72,7 +72,7 @@ class RMRPullToRefreshBaseView: RMRPullToRefreshView { let horizontalConstraint = NSLayoutConstraint(item: logoImageView, attribute: .centerX, - relatedBy: NSLayoutConstraint.Relation.equal, + relatedBy: NSLayoutRelation.equal, toItem: self, attribute: .centerX, multiplier: 1, diff --git a/Classes/RMRPullToRefreshContainerView.swift b/Classes/RMRPullToRefreshContainerView.swift index 6dcc98c..81c5f0a 100755 --- a/Classes/RMRPullToRefreshContainerView.swift +++ b/Classes/RMRPullToRefreshContainerView.swift @@ -25,10 +25,10 @@ open class RMRPullToRefreshContainerView: UIView { if let view = obtainView(state, result: result) { view.translatesAutoresizingMaskIntoConstraints = false addSubview(view) - addConstraint(constraint(self, subview: view, attribute: NSLayoutConstraint.Attribute.left)) - addConstraint(constraint(self, subview: view, attribute: NSLayoutConstraint.Attribute.top)) - addConstraint(constraint(self, subview: view, attribute: NSLayoutConstraint.Attribute.right)) - addConstraint(constraint(self, subview: view, attribute: NSLayoutConstraint.Attribute.bottom)) + addConstraint(constraint(self, subview: view, attribute: NSLayoutAttribute.left)) + addConstraint(constraint(self, subview: view, attribute: NSLayoutAttribute.top)) + addConstraint(constraint(self, subview: view, attribute: NSLayoutAttribute.right)) + addConstraint(constraint(self, subview: view, attribute: NSLayoutAttribute.bottom)) view.layoutIfNeeded() self.currentView = view } @@ -84,7 +84,7 @@ open class RMRPullToRefreshContainerView: UIView { // MARK: - Constraint - func constraint(_ superview: UIView, subview: UIView, attribute: NSLayoutConstraint.Attribute) -> NSLayoutConstraint { - return NSLayoutConstraint(item: subview, attribute: attribute, relatedBy: NSLayoutConstraint.Relation.equal, toItem: superview, attribute: attribute, multiplier: 1, constant: 0) + func constraint(_ superview: UIView, subview: UIView, attribute: NSLayoutAttribute) -> NSLayoutConstraint { + return NSLayoutConstraint(item: subview, attribute: attribute, relatedBy: NSLayoutRelation.equal, toItem: superview, attribute: attribute, multiplier: 1, constant: 0) } } diff --git a/Classes/RMRPullToRefreshController.swift b/Classes/RMRPullToRefreshController.swift index 4fb6359..f9482fb 100755 --- a/Classes/RMRPullToRefreshController.swift +++ b/Classes/RMRPullToRefreshController.swift @@ -28,7 +28,7 @@ fileprivate func > (lhs: T?, rhs: T?) -> Bool { } -open class RMRPullToRefreshController { +open class RMRPullToRefreshController: NSObject { // MARK: - Vars @@ -63,7 +63,8 @@ open class RMRPullToRefreshController { // MARK: - Init init(scrollView: UIScrollView, position:RMRPullToRefreshPosition, actionHandler: @escaping () -> Void) { - + + super.init() self.scrollView = scrollView self.actionHandler = actionHandler self.position = position @@ -84,16 +85,16 @@ open class RMRPullToRefreshController { fileprivate func addBackgroundViewConstraints(_ backgroundView: UIView) { // Constraints - self.backgroundViewHeightConstraint = NSLayoutConstraint(item: backgroundView, attribute: NSLayoutConstraint.Attribute.height, relatedBy: NSLayoutConstraint.Relation.equal, toItem: nil, attribute: NSLayoutConstraint.Attribute.notAnAttribute, multiplier: 1, constant: 0) + self.backgroundViewHeightConstraint = NSLayoutConstraint(item: backgroundView, attribute: NSLayoutAttribute.height, relatedBy: NSLayoutRelation.equal, toItem: nil, attribute: NSLayoutAttribute.notAnAttribute, multiplier: 1, constant: 0) backgroundView.addConstraint(self.backgroundViewHeightConstraint!) - scrollView?.addConstraint(NSLayoutConstraint(item: backgroundView, attribute: NSLayoutConstraint.Attribute.width, relatedBy: NSLayoutConstraint.Relation.equal, toItem: scrollView, attribute: NSLayoutConstraint.Attribute.width, multiplier: 1, constant: 0)) + scrollView?.addConstraint(NSLayoutConstraint(item: backgroundView, attribute: NSLayoutAttribute.width, relatedBy: NSLayoutRelation.equal, toItem: scrollView, attribute: NSLayoutAttribute.width, multiplier: 1, constant: 0)) if position == .top { - scrollView?.addConstraint(NSLayoutConstraint(item: backgroundView, attribute: NSLayoutConstraint.Attribute.bottom, relatedBy: NSLayoutConstraint.Relation.equal, toItem: scrollView, attribute: NSLayoutConstraint.Attribute.top, multiplier: 1, constant: 0)) + scrollView?.addConstraint(NSLayoutConstraint(item: backgroundView, attribute: NSLayoutAttribute.bottom, relatedBy: NSLayoutRelation.equal, toItem: scrollView, attribute: NSLayoutAttribute.top, multiplier: 1, constant: 0)) } else if position == .bottom, let scrollView = self.scrollView { let constant = max(scrollView.contentSize.height, scrollView.bounds.height) - self.backgroundViewTopConstraint = NSLayoutConstraint(item: backgroundView, attribute: NSLayoutConstraint.Attribute.top, relatedBy: NSLayoutConstraint.Relation.equal, toItem: scrollView, attribute: NSLayoutConstraint.Attribute.top, multiplier: 1, constant: constant) + self.backgroundViewTopConstraint = NSLayoutConstraint(item: backgroundView, attribute: NSLayoutAttribute.top, relatedBy: NSLayoutRelation.equal, toItem: scrollView, attribute: NSLayoutAttribute.top, multiplier: 1, constant: constant) scrollView.addConstraint(self.backgroundViewTopConstraint!) } } @@ -165,14 +166,9 @@ open class RMRPullToRefreshController { } } self?.contentSizeWhenStartLoading = nil - - DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + afterDelay) { - self?.resetBackgroundViewHeightConstraint() - } - } - DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + afterDelay) { - self?.stopAllAnimations() + self?.perform(#selector(self?.resetBackgroundViewHeightConstraint), with: nil, afterDelay: afterDelay) } + self?.perform(#selector(self?.stopAllAnimations), with: nil, afterDelay: afterDelay) }) } @@ -243,7 +239,7 @@ open class RMRPullToRefreshController { backgroundViewHeightConstraint?.constant = 0 } - fileprivate func scrollViewDidChangePanState(_ scrollView: UIScrollView, panState: UIGestureRecognizer.State) { + fileprivate func scrollViewDidChangePanState(_ scrollView: UIScrollView, panState: UIGestureRecognizerState) { if panState == .ended || panState == .cancelled || panState == .failed { if state == .loading || (shouldHideWhenStopLoading() && !stopped) { @@ -290,7 +286,7 @@ open class RMRPullToRefreshController { if scrollView.contentOffset.y >= 0 { scrollView.contentInset = UIEdgeInsets.zero } else { - scrollView.contentInset = UIEdgeInsets.init(top: min(-scrollView.contentOffset.y, originalTopInset+height),left: 0,bottom: 0,right: 0) + scrollView.contentInset = UIEdgeInsetsMake(min(-scrollView.contentOffset.y, originalTopInset+height),0,0,0) } } @@ -364,7 +360,7 @@ open class RMRPullToRefreshController { changingContentInset = true UIView.animate(withDuration: 0.3, delay: 0.0, - options: UIView.AnimationOptions.beginFromCurrentState, + options: UIViewAnimationOptions.beginFromCurrentState, animations: { [weak self]() -> Void in self?.scrollView?.contentInset = contentInset }, completion: { [weak self](finished) -> Void in @@ -393,34 +389,43 @@ open class RMRPullToRefreshController { } // MARK: - KVO - - var contentOffsetObservation: NSKeyValueObservation? - var contentSizeObservation: NSKeyValueObservation? open func subscribeOnScrollViewEvents() { - guard let scrollView = self.scrollView else { return } - - contentOffsetObservation = scrollView.observe(\.contentOffset, options: .new) { [weak self] scrollView, changes in - guard let newContentOffset = changes.newValue else { return } - self?.scrollViewDidScroll(scrollView, contentOffset: newContentOffset) + if !subscribing, let scrollView = self.scrollView { + scrollView.addObserver(self, forKeyPath: RMRPullToRefreshConstants.KeyPaths.ContentOffset, options: .new, context: nil) + scrollView.addObserver(self, forKeyPath: RMRPullToRefreshConstants.KeyPaths.ContentSize, options: .new, context: nil) + scrollView.addObserver(self, forKeyPath: RMRPullToRefreshConstants.KeyPaths.PanState, options: .new, context: nil) + subscribing = true } - - contentSizeObservation = scrollView.observe(\.contentSize, options: .new) { [weak self] scrollView, changes in - guard let newContentSize = changes.newValue else { return } - self?.scrollViewDidChangeContentSize(scrollView, contentSize: newContentSize) - } - - self.scrollView?.panGestureRecognizer.addTarget(self, action: #selector(onPanGesture)) - } - - @objc func onPanGesture(gesture: UIPanGestureRecognizer) { - guard let scrollView = self.scrollView else { return } - scrollViewDidChangePanState(scrollView, panState: gesture.state) } open func unsubscribeFromScrollViewEvents() { - contentOffsetObservation = nil - contentSizeObservation = nil + if subscribing, let scrollView = self.containerView.superview { + scrollView.removeObserver(self, forKeyPath: RMRPullToRefreshConstants.KeyPaths.ContentOffset) + scrollView.removeObserver(self, forKeyPath: RMRPullToRefreshConstants.KeyPaths.ContentSize) + scrollView.removeObserver(self, forKeyPath: RMRPullToRefreshConstants.KeyPaths.PanState) + subscribing = false + } + } + + override open func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?) { + if keyPath == RMRPullToRefreshConstants.KeyPaths.ContentOffset { + if let newContentOffset = (change?[NSKeyValueChangeKey.newKey] as? NSValue)?.cgPointValue, let scrollView = self.scrollView { + scrollViewDidScroll(scrollView, contentOffset:newContentOffset) + } + } else if keyPath == RMRPullToRefreshConstants.KeyPaths.ContentSize { + if let newContentSize = (change?[NSKeyValueChangeKey.newKey] as? NSValue)?.cgSizeValue, let scrollView = self.scrollView { + if checkContentSize(scrollView) { + scrollViewDidChangeContentSize(scrollView, contentSize: newContentSize) + } + } + } else if keyPath == RMRPullToRefreshConstants.KeyPaths.PanState { + if let rawValue = change?[NSKeyValueChangeKey.newKey] as? Int { + if let state = UIGestureRecognizerState(rawValue: rawValue), let scrollView = self.scrollView { + scrollViewDidChangePanState(scrollView, panState: state) + } + } + } } } diff --git a/Example/RMRPullToRefresh/AppDelegate.swift b/Example/RMRPullToRefresh/AppDelegate.swift index 4655fe4..c410b83 100644 --- a/Example/RMRPullToRefresh/AppDelegate.swift +++ b/Example/RMRPullToRefresh/AppDelegate.swift @@ -14,7 +14,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. return true } diff --git a/Example/RMRPullToRefresh/Base.lproj/Main.storyboard b/Example/RMRPullToRefresh/Base.lproj/Main.storyboard index e3552ef..d49d3ac 100644 --- a/Example/RMRPullToRefresh/Base.lproj/Main.storyboard +++ b/Example/RMRPullToRefresh/Base.lproj/Main.storyboard @@ -1,12 +1,8 @@ - - - - - + + - - + @@ -14,9 +10,9 @@ - + - + @@ -24,79 +20,79 @@ - + - + - + - + - + - + - + - + - + - + - + @@ -106,28 +102,28 @@ - + - + - + @@ -137,28 +133,28 @@ - + - + - + @@ -172,28 +168,28 @@ - + - + - + @@ -203,28 +199,28 @@ - + - + - + @@ -245,7 +241,7 @@ - + @@ -256,26 +252,26 @@ - + - - - + + + - - + + - + @@ -288,7 +284,7 @@ - + diff --git a/Example/RMRPullToRefresh/ViewController.swift b/Example/RMRPullToRefresh/ViewController.swift index e295bef..1432c01 100644 --- a/Example/RMRPullToRefresh/ViewController.swift +++ b/Example/RMRPullToRefresh/ViewController.swift @@ -46,17 +46,15 @@ class ViewController: UIViewController, UITableViewDataSource, UITableViewDelega func configurePullToRefresh() { - pullToRefresh = RMRPullToRefresh( - scrollView: tableView, - position: position()) { [weak self] in - DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + Double(Int64(5.0 * Double(NSEC_PER_SEC))) / Double(NSEC_PER_SEC), execute: { - if self?.result == .success { - self?.loadMore() - } - if let result = self?.result { - self?.pullToRefresh?.stopLoading(result) - } - }) + pullToRefresh = RMRPullToRefresh(scrollView: tableView, position: position()) { [weak self] _ in + DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + Double(Int64(5.0 * Double(NSEC_PER_SEC))) / Double(NSEC_PER_SEC), execute: { + if self?.result == .success { + self?.loadMore() + } + if let result = self?.result { + self?.pullToRefresh?.stopLoading(result) + } + }) } if exampleType == .perekrestokTop || exampleType == .perekrestokBottom { diff --git a/Example/RMRPullToRefreshExample.xcodeproj/project.pbxproj b/Example/RMRPullToRefreshExample.xcodeproj/project.pbxproj index cc273b6..626c2ee 100644 --- a/Example/RMRPullToRefreshExample.xcodeproj/project.pbxproj +++ b/Example/RMRPullToRefreshExample.xcodeproj/project.pbxproj @@ -132,6 +132,7 @@ 89CB12311C9DA07B00048E46 /* Frameworks */, 89CB12321C9DA07B00048E46 /* Resources */, 2BE863C51DEA329C1234F1B0 /* [CP] Embed Pods Frameworks */, + C137BE069515EFF1A69455DF /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -148,13 +149,12 @@ 89CB122C1C9DA07B00048E46 /* Project object */ = { isa = PBXProject; attributes = { - LastSwiftUpdateCheck = 1000; - LastUpgradeCheck = 1000; + LastSwiftUpdateCheck = 0720; + LastUpgradeCheck = 0720; ORGANIZATIONNAME = "Merkulov Ilya"; TargetAttributes = { 89CB12331C9DA07B00048E46 = { CreatedOnToolsVersion = 7.2.1; - DevelopmentTeam = GMD7EK7S94; LastSwiftMigration = 0800; }; }; @@ -199,16 +199,13 @@ files = ( ); inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", ); name = "[CP] Check Pods Manifest.lock"; outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-RMRPullToRefreshExample-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; showEnvVarsInLog = 0; }; 2BE863C51DEA329C1234F1B0 /* [CP] Embed Pods Frameworks */ = { @@ -217,18 +214,30 @@ files = ( ); inputPaths = ( - "${SRCROOT}/Pods/Target Support Files/Pods-RMRPullToRefreshExample/Pods-RMRPullToRefreshExample-frameworks.sh", - "${BUILT_PRODUCTS_DIR}/RMRPullToRefresh/RMRPullToRefresh.framework", ); name = "[CP] Embed Pods Frameworks"; outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RMRPullToRefresh.framework", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-RMRPullToRefreshExample/Pods-RMRPullToRefreshExample-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; + C137BE069515EFF1A69455DF /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Copy Pods Resources"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-RMRPullToRefreshExample/Pods-RMRPullToRefreshExample-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -274,23 +283,13 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; @@ -312,7 +311,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.2; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -328,23 +327,13 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; @@ -360,10 +349,9 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.2; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; - SWIFT_COMPILATION_MODE = wholemodule; VALIDATE_PRODUCT = YES; }; name = Release; @@ -373,14 +361,12 @@ baseConfigurationReference = 51A8D36C5CCC1E18D2666CD6 /* Pods-RMRPullToRefreshExample.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - DEVELOPMENT_TEAM = GMD7EK7S94; FRAMEWORK_SEARCH_PATHS = "$(inherited)"; INFOPLIST_FILE = RMRPullToRefresh/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.redmadrobot.RMRPullToRefresh; PRODUCT_NAME = RMRPullToRefreshExample; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 3.0; }; name = Debug; }; @@ -389,14 +375,12 @@ baseConfigurationReference = 9373B01A0C7A0314295D05D2 /* Pods-RMRPullToRefreshExample.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - DEVELOPMENT_TEAM = GMD7EK7S94; FRAMEWORK_SEARCH_PATHS = "$(inherited)"; INFOPLIST_FILE = RMRPullToRefresh/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.redmadrobot.RMRPullToRefresh; PRODUCT_NAME = RMRPullToRefreshExample; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 3.0; }; name = Release; }; diff --git a/RMRPullToRefresh.podspec b/RMRPullToRefresh.podspec index 6b8c56f..ce4a926 100644 --- a/RMRPullToRefresh.podspec +++ b/RMRPullToRefresh.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |spec| spec.name = "RMRPullToRefresh" - spec.version = "0.6.0" - spec.platform = :ios, "9.0" + spec.version = "0.5.0" + spec.platform = :ios, "8.0" spec.license = { :type => "MIT", :file => "LICENSE" } spec.summary = "A pull to refresh control for UIScrollView (UITableView and UICollectionView)" spec.homepage = "http://redmadrobot.com/"