Compare commits

..

No commits in common. "master" and "v0.2" have entirely different histories.
master ... v0.2

18 changed files with 277 additions and 493 deletions

177
.gitignore vendored
View File

@ -1,177 +0,0 @@
#########################
# .gitignore file for Xcode4 and Xcode5 Source projects
#
# Apple bugs, waiting for Apple to fix/respond:
#
# 15564624 - what does the xccheckout file in Xcode5 do? Where's the documentation?
#
# Version 2.1
# For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects
#
# 2013 updates:
# - fixed the broken "save personal Schemes"
# - added line-by-line explanations for EVERYTHING (some were missing)
#
# NB: if you are storing "built" products, this WILL NOT WORK,
# and you should use a different .gitignore (or none at all)
# This file is for SOURCE projects, where there are many extra
# files that we want to exclude
#
#########################
#####
# OS X temporary files that should never be committed
#
# c.f. http://www.westwind.com/reference/os-x/invisibles.html
.DS_Store
# c.f. http://www.westwind.com/reference/os-x/invisibles.html
.Trashes
# c.f. http://www.westwind.com/reference/os-x/invisibles.html
*.swp
# *.lock - this is used and abused by many editors for many different things.
# For the main ones I use (e.g. Eclipse), it should be excluded
# from source-control, but YMMV
*.lock
#
# profile - REMOVED temporarily (on double-checking, this seems incorrect; I can't find it in OS X docs?)
#profile
####
# Xcode temporary files that should never be committed
#
# NB: NIB/XIB files still exist even on Storyboard projects, so we want this...
*~.nib
####
# Xcode build files -
#
# NB: slash on the end, so we only remove the FOLDER, not any files that were badly named "DerivedData"
DerivedData/
# NB: slash on the end, so we only remove the FOLDER, not any files that were badly named "build"
build/
#####
# Xcode private settings (window sizes, bookmarks, breakpoints, custom executables, smart groups)
#
# This is complicated:
#
# SOMETIMES you need to put this file in version control.
# Apple designed it poorly - if you use "custom executables", they are
# saved in this file.
# 99% of projects do NOT use those, so they do NOT want to version control this file.
# ..but if you're in the 1%, comment out the line "*.pbxuser"
# .pbxuser: http://lists.apple.com/archives/xcode-users/2004/Jan/msg00193.html
*.pbxuser
# .mode1v3: http://lists.apple.com/archives/xcode-users/2007/Oct/msg00465.html
*.mode1v3
# .mode2v3: http://lists.apple.com/archives/xcode-users/2007/Oct/msg00465.html
*.mode2v3
# .perspectivev3: http://stackoverflow.com/questions/5223297/xcode-projects-what-is-a-perspectivev3-file
*.perspectivev3
# NB: also, whitelist the default ones, some projects need to use these
!default.pbxuser
!default.mode1v3
!default.mode2v3
!default.perspectivev3
####
# Xcode 4 - semi-personal settings
#
#
# OPTION 1: ---------------------------------
# throw away ALL personal settings (including custom schemes!
# - unless they are "shared")
#
# NB: this is exclusive with OPTION 2 below
xcuserdata
# OPTION 2: ---------------------------------
# get rid of ALL personal settings, but KEEP SOME OF THEM
# - NB: you must manually uncomment the bits you want to keep
#
# NB: this *requires* git v1.8.2 or above; you may need to upgrade to latest OS X,
# or manually install git over the top of the OS X version
# NB: this is exclusive with OPTION 1 above
#
#xcuserdata/**/*
# (requires option 2 above): Personal Schemes
#
#!xcuserdata/**/xcschemes/*
####
# XCode 4 workspaces - more detailed
#
# Workspaces are important! They are a core feature of Xcode - don't exclude them :)
#
# Workspace layout is quite spammy. For reference:
#
# /(root)/
# /(project-name).xcodeproj/
# project.pbxproj
# /project.xcworkspace/
# contents.xcworkspacedata
# /xcuserdata/
# /(your name)/xcuserdatad/
# UserInterfaceState.xcuserstate
# /xcsshareddata/
# /xcschemes/
# (shared scheme name).xcscheme
# /xcuserdata/
# /(your name)/xcuserdatad/
# (private scheme).xcscheme
# xcschememanagement.plist
#
#
####
# Xcode 4 - Deprecated classes
#
# Allegedly, if you manually "deprecate" your classes, they get moved here.
#
# We're using source-control, so this is a "feature" that we do not want!
*.moved-aside
####
# UNKNOWN: recommended by others, but I can't discover what these files are
#
# ...none. Everything is now explained.
####
# Pods ignoring:
Pods
!Podfile.lock
# xccheckout ignoring
# ref. http://stackoverflow.com/questions/18340453/should-xccheckout-files-in-xcode5-be-ignored-under-vcs
*.xccheckout
# AppCode configuration ignoring
.idea/

View File

@ -39,10 +39,10 @@ class RMRPullToRefreshBaseMessageView: RMRPullToRefreshBaseView {
messageView.addSubview(label) messageView.addSubview(label)
label.translatesAutoresizingMaskIntoConstraints = false 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, messageView.addConstraint(NSLayoutConstraint(item: label,
attribute: attribute, attribute: attribute,
relatedBy: NSLayoutConstraint.Relation.equal, relatedBy: NSLayoutRelation.equal,
toItem: messageView, toItem: messageView,
attribute: attribute, attribute: attribute,
multiplier: 1, multiplier: 1,
@ -58,18 +58,18 @@ class RMRPullToRefreshBaseMessageView: RMRPullToRefreshBaseView {
messageView.translatesAutoresizingMaskIntoConstraints = false messageView.translatesAutoresizingMaskIntoConstraints = false
let heightConstraint = NSLayoutConstraint(item: messageView, let heightConstraint = NSLayoutConstraint(item: messageView,
attribute: NSLayoutConstraint.Attribute.height, attribute: NSLayoutAttribute.height,
relatedBy: NSLayoutConstraint.Relation.equal, relatedBy: NSLayoutRelation.equal,
toItem: nil, toItem: nil,
attribute: NSLayoutConstraint.Attribute.notAnAttribute, attribute: NSLayoutAttribute.notAnAttribute,
multiplier: 1, multiplier: 1,
constant: 30) constant: 30)
let widthConstraint = NSLayoutConstraint(item: messageView, let widthConstraint = NSLayoutConstraint(item: messageView,
attribute: NSLayoutConstraint.Attribute.width, attribute: NSLayoutAttribute.width,
relatedBy: NSLayoutConstraint.Relation.equal, relatedBy: NSLayoutRelation.equal,
toItem: nil, toItem: nil,
attribute: NSLayoutConstraint.Attribute.notAnAttribute, attribute: NSLayoutAttribute.notAnAttribute,
multiplier: 1, multiplier: 1,
constant: 150) constant: 150)
@ -77,7 +77,7 @@ class RMRPullToRefreshBaseMessageView: RMRPullToRefreshBaseView {
let verticalConstraint = NSLayoutConstraint(item: messageView, let verticalConstraint = NSLayoutConstraint(item: messageView,
attribute: .centerY, attribute: .centerY,
relatedBy: NSLayoutConstraint.Relation.equal, relatedBy: NSLayoutRelation.equal,
toItem: self, toItem: self,
attribute: .centerY, attribute: .centerY,
multiplier: 1, multiplier: 1,
@ -85,7 +85,7 @@ class RMRPullToRefreshBaseMessageView: RMRPullToRefreshBaseView {
let leftConstraint = NSLayoutConstraint(item: messageView, let leftConstraint = NSLayoutConstraint(item: messageView,
attribute: .left, attribute: .left,
relatedBy: NSLayoutConstraint.Relation.equal, relatedBy: NSLayoutRelation.equal,
toItem: self, toItem: self,
attribute: .right, attribute: .right,
multiplier: 1, multiplier: 1,

View File

@ -45,18 +45,18 @@ class RMRPullToRefreshBaseView: RMRPullToRefreshView {
func configureConstraints() { func configureConstraints() {
logoImageView.translatesAutoresizingMaskIntoConstraints = false logoImageView.translatesAutoresizingMaskIntoConstraints = false
let heightConstraint = NSLayoutConstraint(item: logoImageView, let heightConstraint = NSLayoutConstraint(item: logoImageView,
attribute: NSLayoutConstraint.Attribute.height, attribute: NSLayoutAttribute.height,
relatedBy: NSLayoutConstraint.Relation.equal, relatedBy: NSLayoutRelation.equal,
toItem: nil, toItem: nil,
attribute: NSLayoutConstraint.Attribute.notAnAttribute, attribute: NSLayoutAttribute.notAnAttribute,
multiplier: 1, multiplier: 1,
constant: 50) constant: 50)
let widthConstraint = NSLayoutConstraint(item: logoImageView, let widthConstraint = NSLayoutConstraint(item: logoImageView,
attribute: NSLayoutConstraint.Attribute.width, attribute: NSLayoutAttribute.width,
relatedBy: NSLayoutConstraint.Relation.equal, relatedBy: NSLayoutRelation.equal,
toItem: nil, toItem: nil,
attribute: NSLayoutConstraint.Attribute.notAnAttribute, attribute: NSLayoutAttribute.notAnAttribute,
multiplier: 1, multiplier: 1,
constant: 50) constant: 50)
@ -64,7 +64,7 @@ class RMRPullToRefreshBaseView: RMRPullToRefreshView {
let verticalConstraint = NSLayoutConstraint(item: logoImageView, let verticalConstraint = NSLayoutConstraint(item: logoImageView,
attribute: .centerY, attribute: .centerY,
relatedBy: NSLayoutConstraint.Relation.equal, relatedBy: NSLayoutRelation.equal,
toItem: self, toItem: self,
attribute: .centerY, attribute: .centerY,
multiplier: 1, multiplier: 1,
@ -72,7 +72,7 @@ class RMRPullToRefreshBaseView: RMRPullToRefreshView {
let horizontalConstraint = NSLayoutConstraint(item: logoImageView, let horizontalConstraint = NSLayoutConstraint(item: logoImageView,
attribute: .centerX, attribute: .centerX,
relatedBy: NSLayoutConstraint.Relation.equal, relatedBy: NSLayoutRelation.equal,
toItem: self, toItem: self,
attribute: .centerX, attribute: .centerX,
multiplier: 1, multiplier: 1,
@ -85,7 +85,7 @@ class RMRPullToRefreshBaseView: RMRPullToRefreshView {
func resetTransformIfNecessary() { func resetTransformIfNecessary() {
if !isConfigured { if !isConfigured {
logoImageView.transform = CGAffineTransform(rotationAngle: .pi) logoImageView.transform = CGAffineTransform(rotationAngle: CGFloat(M_PI))
didRotateToBottom = true didRotateToBottom = true
isConfigured = true isConfigured = true
} }
@ -94,7 +94,7 @@ class RMRPullToRefreshBaseView: RMRPullToRefreshView {
func makeIncreasePulling(_ animated: Bool) { func makeIncreasePulling(_ animated: Bool) {
didRotateToTop = true didRotateToTop = true
didRotateToBottom = false didRotateToBottom = false
let rotateTransform = logoImageView.transform.rotated(by: .pi); let rotateTransform = logoImageView.transform.rotated(by: CGFloat(M_PI));
if animated { if animated {
UIView .animate(withDuration: 0.4, animations: { [weak self] in UIView .animate(withDuration: 0.4, animations: { [weak self] in
self?.logoImageView.transform = rotateTransform self?.logoImageView.transform = rotateTransform
@ -107,7 +107,7 @@ class RMRPullToRefreshBaseView: RMRPullToRefreshView {
func makeDecreasePulling(_ animated: Bool) { func makeDecreasePulling(_ animated: Bool) {
didRotateToBottom = true didRotateToBottom = true
didRotateToTop = false didRotateToTop = false
let rotateTransform = logoImageView.transform.rotated(by: -.pi); let rotateTransform = logoImageView.transform.rotated(by: -CGFloat(M_PI));
if animated { if animated {
UIView .animate(withDuration: 0.4, animations: { [weak self] in UIView .animate(withDuration: 0.4, animations: { [weak self] in
self?.logoImageView.transform = rotateTransform self?.logoImageView.transform = rotateTransform

6
Classes/RMRPullToRefresh.swift Normal file → Executable file
View File

@ -10,7 +10,7 @@ import UIKit
open class RMRPullToRefresh: NSObject { open class RMRPullToRefresh: NSObject {
private var сontroller: RMRPullToRefreshController? fileprivate var сontroller: RMRPullToRefreshController?
open var height : CGFloat = RMRPullToRefreshConstants.DefaultHeight { open var height : CGFloat = RMRPullToRefreshConstants.DefaultHeight {
didSet { didSet {
@ -73,8 +73,4 @@ open class RMRPullToRefresh: NSObject {
open func setHideDelay(_ delay: TimeInterval, result: RMRPullToRefreshResultType) { open func setHideDelay(_ delay: TimeInterval, result: RMRPullToRefreshResultType) {
сontroller?.setHideDelay(delay, result: result) сontroller?.setHideDelay(delay, result: result)
} }
open var state: RMRPullToRefreshState {
return сontroller?.state ?? .stopped
}
} }

View File

@ -27,6 +27,14 @@ public enum RMRPullToRefreshResultType: Int {
public struct RMRPullToRefreshConstants { public struct RMRPullToRefreshConstants {
struct KeyPaths {
static let ContentOffset = "contentOffset"
static let ContentSize = "contentSize"
static let ContentInset = "contentInset"
static let PanState = "pan.state"
static let Frame = "frame"
}
static let DefaultHeight = CGFloat(90.0) static let DefaultHeight = CGFloat(90.0)
static let DefaultBackgroundColor = UIColor.white static let DefaultBackgroundColor = UIColor.white
} }

View File

@ -25,10 +25,10 @@ open class RMRPullToRefreshContainerView: UIView {
if let view = obtainView(state, result: result) { if let view = obtainView(state, result: result) {
view.translatesAutoresizingMaskIntoConstraints = false view.translatesAutoresizingMaskIntoConstraints = false
addSubview(view) addSubview(view)
addConstraint(constraint(self, subview: view, attribute: NSLayoutConstraint.Attribute.left)) addConstraint(constraint(self, subview: view, attribute: NSLayoutAttribute.left))
addConstraint(constraint(self, subview: view, attribute: NSLayoutConstraint.Attribute.top)) addConstraint(constraint(self, subview: view, attribute: NSLayoutAttribute.top))
addConstraint(constraint(self, subview: view, attribute: NSLayoutConstraint.Attribute.right)) addConstraint(constraint(self, subview: view, attribute: NSLayoutAttribute.right))
addConstraint(constraint(self, subview: view, attribute: NSLayoutConstraint.Attribute.bottom)) addConstraint(constraint(self, subview: view, attribute: NSLayoutAttribute.bottom))
view.layoutIfNeeded() view.layoutIfNeeded()
self.currentView = view self.currentView = view
} }
@ -84,7 +84,7 @@ open class RMRPullToRefreshContainerView: UIView {
// MARK: - Constraint // MARK: - Constraint
func constraint(_ superview: UIView, subview: UIView, attribute: NSLayoutConstraint.Attribute) -> NSLayoutConstraint { func constraint(_ superview: UIView, subview: UIView, attribute: NSLayoutAttribute) -> NSLayoutConstraint {
return NSLayoutConstraint(item: subview, attribute: attribute, relatedBy: NSLayoutConstraint.Relation.equal, toItem: superview, attribute: attribute, multiplier: 1, constant: 0) return NSLayoutConstraint(item: subview, attribute: attribute, relatedBy: NSLayoutRelation.equal, toItem: superview, attribute: attribute, multiplier: 1, constant: 0)
} }
} }

158
Classes/RMRPullToRefreshController.swift Normal file → Executable file
View File

@ -7,8 +7,28 @@
// //
import UIKit import UIKit
fileprivate func < <T : Comparable>(lhs: T?, rhs: T?) -> Bool {
switch (lhs, rhs) {
case let (l?, r?):
return l < r
case (nil, _?):
return true
default:
return false
}
}
open class RMRPullToRefreshController { fileprivate func > <T : Comparable>(lhs: T?, rhs: T?) -> Bool {
switch (lhs, rhs) {
case let (l?, r?):
return l > r
default:
return rhs < lhs
}
}
open class RMRPullToRefreshController: NSObject {
// MARK: - Vars // MARK: - Vars
@ -21,6 +41,7 @@ open class RMRPullToRefreshController {
var backgroundViewTopConstraint: NSLayoutConstraint? var backgroundViewTopConstraint: NSLayoutConstraint?
var stopped = true var stopped = true
var subscribing = false
var actionHandler: (() -> Void)! var actionHandler: (() -> Void)!
@ -39,16 +60,11 @@ open class RMRPullToRefreshController {
open var hideWhenError: Bool = true open var hideWhenError: Bool = true
// MARK: - Observation
private var contentOffsetObservation: NSKeyValueObservation?
private var contentSizeObservation: NSKeyValueObservation?
private var panStateObservation: NSKeyValueObservation?
// MARK: - Init // MARK: - Init
init(scrollView: UIScrollView, position:RMRPullToRefreshPosition, actionHandler: @escaping () -> Void) { init(scrollView: UIScrollView, position:RMRPullToRefreshPosition, actionHandler: @escaping () -> Void) {
super.init()
self.scrollView = scrollView self.scrollView = scrollView
self.actionHandler = actionHandler self.actionHandler = actionHandler
self.position = position self.position = position
@ -61,36 +77,34 @@ open class RMRPullToRefreshController {
self.subscribeOnScrollViewEvents() self.subscribeOnScrollViewEvents()
} }
private func configureBackgroundView(_ backgroundView: UIView) { deinit {
self.unsubscribeFromScrollViewEvents()
}
fileprivate func configureBackgroundView(_ backgroundView: UIView) {
backgroundView.translatesAutoresizingMaskIntoConstraints = false backgroundView.translatesAutoresizingMaskIntoConstraints = false
scrollView?.addSubview(backgroundView) scrollView?.addSubview(backgroundView)
addBackgroundViewConstraints(backgroundView) addBackgroundViewConstraints(backgroundView)
} }
private func addBackgroundViewConstraints(_ backgroundView: UIView) { fileprivate func addBackgroundViewConstraints(_ backgroundView: UIView) {
guard let scrollView = scrollView, let position = position else { // Constraints
return self.backgroundViewHeightConstraint = NSLayoutConstraint(item: backgroundView, attribute: NSLayoutAttribute.height, relatedBy: NSLayoutRelation.equal, toItem: nil, attribute: NSLayoutAttribute.notAnAttribute, multiplier: 1, constant: 0)
} backgroundView.addConstraint(self.backgroundViewHeightConstraint!)
let backgroundViewHeightConstraint = backgroundView.heightAnchor.constraint(equalToConstant: 0)
backgroundViewHeightConstraint.isActive = true
self.backgroundViewHeightConstraint = backgroundViewHeightConstraint
backgroundView.widthAnchor.constraint(equalTo: scrollView.widthAnchor).isActive = true scrollView?.addConstraint(NSLayoutConstraint(item: backgroundView, attribute: NSLayoutAttribute.width, relatedBy: NSLayoutRelation.equal, toItem: scrollView, attribute: NSLayoutAttribute.width, multiplier: 1, constant: 0))
switch position { if position == .top {
case .top: scrollView?.addConstraint(NSLayoutConstraint(item: backgroundView, attribute: NSLayoutAttribute.bottom, relatedBy: NSLayoutRelation.equal, toItem: scrollView, attribute: NSLayoutAttribute.top, multiplier: 1, constant: 0))
backgroundView.bottomAnchor.constraint(equalTo: scrollView.topAnchor).isActive = true } else if position == .bottom, let scrollView = self.scrollView {
case .bottom:
let constant = max(scrollView.contentSize.height, scrollView.bounds.height) let constant = max(scrollView.contentSize.height, scrollView.bounds.height)
let backgroundViewTopConstraint = backgroundView.topAnchor.constraint( self.backgroundViewTopConstraint = NSLayoutConstraint(item: backgroundView, attribute: NSLayoutAttribute.top, relatedBy: NSLayoutRelation.equal, toItem: scrollView, attribute: NSLayoutAttribute.top, multiplier: 1, constant: constant)
equalTo: scrollView.bottomAnchor, constant: constant) scrollView.addConstraint(self.backgroundViewTopConstraint!)
backgroundViewTopConstraint.isActive = true
self.backgroundViewTopConstraint = backgroundViewTopConstraint
} }
} }
private func configureHeight() { fileprivate func configureHeight() {
if let scrollView = self.scrollView { if let scrollView = self.scrollView {
self.originalTopInset = scrollView.contentInset.top self.originalTopInset = scrollView.contentInset.top
self.originalBottomInset = scrollView.contentInset.bottom self.originalBottomInset = scrollView.contentInset.bottom
@ -156,14 +170,9 @@ open class RMRPullToRefreshController {
} }
} }
self?.contentSizeWhenStartLoading = nil self?.contentSizeWhenStartLoading = nil
self?.perform(#selector(self?.resetBackgroundViewHeightConstraint), with: nil, afterDelay: afterDelay)
DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + afterDelay) {
self?.resetBackgroundViewHeightConstraint()
}
}
DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + afterDelay) {
self?.stopAllAnimations()
} }
self?.perform(#selector(self?.stopAllAnimations), with: nil, afterDelay: afterDelay)
}) })
} }
@ -218,23 +227,23 @@ open class RMRPullToRefreshController {
containerView.startLoadingAnimation(startProgress) containerView.startLoadingAnimation(startProgress)
} }
@objc private func stopAllAnimations() { @objc fileprivate func stopAllAnimations() {
if shouldHideWhenStopLoading() { if shouldHideWhenStopLoading() {
stopped = true stopped = true
} }
containerView.stopAllAnimations(shouldHideWhenStopLoading()) containerView.stopAllAnimations(shouldHideWhenStopLoading())
} }
@objc private func forceStopAllAnimations() { @objc fileprivate func forceStopAllAnimations() {
stopped = true stopped = true
containerView.stopAllAnimations(true) containerView.stopAllAnimations(true)
} }
@objc private func resetBackgroundViewHeightConstraint() { @objc fileprivate func resetBackgroundViewHeightConstraint() {
backgroundViewHeightConstraint?.constant = 0 backgroundViewHeightConstraint?.constant = 0
} }
private func scrollViewDidChangePanState(_ scrollView: UIScrollView, panState: UIGestureRecognizer.State) { fileprivate func scrollViewDidChangePanState(_ scrollView: UIScrollView, panState: UIGestureRecognizerState) {
if panState == .ended || panState == .cancelled || panState == .failed { if panState == .ended || panState == .cancelled || panState == .failed {
if state == .loading || (shouldHideWhenStopLoading() && !stopped) { if state == .loading || (shouldHideWhenStopLoading() && !stopped) {
@ -265,7 +274,7 @@ open class RMRPullToRefreshController {
} }
} }
private func scrollViewDidChangeContentSize(_ scrollView: UIScrollView, contentSize: CGSize) { fileprivate func scrollViewDidChangeContentSize(_ scrollView: UIScrollView, contentSize: CGSize) {
updateContainerFrame() updateContainerFrame()
if position == .bottom { if position == .bottom {
self.backgroundViewTopConstraint?.constant = max(scrollView.contentSize.height, scrollView.bounds.height) self.backgroundViewTopConstraint?.constant = max(scrollView.contentSize.height, scrollView.bounds.height)
@ -275,13 +284,13 @@ open class RMRPullToRefreshController {
} }
} }
private func scrollViewDidScroll(_ scrollView: UIScrollView, contentOffset: CGPoint) { fileprivate func scrollViewDidScroll(_ scrollView: UIScrollView, contentOffset: CGPoint) {
if state == .loading { if state == .loading {
if scrollView.contentOffset.y >= 0 { if scrollView.contentOffset.y >= 0 {
scrollView.contentInset = UIEdgeInsets.zero scrollView.contentInset = UIEdgeInsets.zero
} else { } 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)
} }
} }
@ -307,17 +316,15 @@ open class RMRPullToRefreshController {
} }
} }
private func configureBackgroundHeightConstraint(_ contentOffsetY: CGFloat, contentInset: UIEdgeInsets) { fileprivate func configureBackgroundHeightConstraint(_ contentOffsetY: CGFloat, contentInset: UIEdgeInsets) {
var constant = CGFloat(-1.0) var constant = CGFloat(-1.0)
if position == .top { if position == .top {
constant = contentOffsetY + contentInset.top constant = contentOffsetY + contentInset.top
} else { } else {
constant = contentOffsetY + contentInset.bottom constant = contentOffsetY + contentInset.bottom
} }
if let backgroundViewHeightConstraint = backgroundViewHeightConstraint, if constant > 0 && constant > backgroundViewHeightConstraint?.constant {
constant > 0, backgroundViewHeightConstraint?.constant = constant
constant > backgroundViewHeightConstraint.constant {
backgroundViewHeightConstraint.constant = constant
} }
} }
@ -357,7 +364,7 @@ open class RMRPullToRefreshController {
changingContentInset = true changingContentInset = true
UIView.animate(withDuration: 0.3, UIView.animate(withDuration: 0.3,
delay: 0.0, delay: 0.0,
options: UIView.AnimationOptions.beginFromCurrentState, options: UIViewAnimationOptions.beginFromCurrentState,
animations: { [weak self]() -> Void in animations: { [weak self]() -> Void in
self?.scrollView?.contentInset = contentInset self?.scrollView?.contentInset = contentInset
}, completion: { [weak self](finished) -> Void in }, completion: { [weak self](finished) -> Void in
@ -388,34 +395,41 @@ open class RMRPullToRefreshController {
// MARK: - KVO // MARK: - KVO
open func subscribeOnScrollViewEvents() { open func subscribeOnScrollViewEvents() {
guard let scrollView = scrollView else { if !subscribing, let scrollView = self.scrollView {
return 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)
self.contentOffsetObservation = scrollView.observe( subscribing = true
\.contentOffset,
options: [.new]) { [weak self] (scrollView, change) in
guard let newContentOffset = change.newValue else { return }
self?.scrollViewDidScroll(scrollView, contentOffset: newContentOffset)
}
self.contentSizeObservation = scrollView.observe(
\.contentSize,
options: [.new]) { [weak self] (scrollView, change) in
guard let newContentSize = change.newValue else { return }
self?.scrollViewDidChangeContentSize(scrollView, contentSize: newContentSize)
}
self.panStateObservation = scrollView.panGestureRecognizer.observe(
\.state,
options: [.new]) { [weak self] panGestureRecognizer, _ in
self?.scrollViewDidChangePanState(scrollView, panState: panGestureRecognizer.state)
} }
} }
open func unsubscribeFromScrollViewEvents() { open func unsubscribeFromScrollViewEvents() {
contentOffsetObservation?.invalidate() if subscribing, let scrollView = self.containerView.superview {
contentSizeObservation?.invalidate() scrollView.removeObserver(self, forKeyPath: RMRPullToRefreshConstants.KeyPaths.ContentOffset)
panStateObservation?.invalidate() 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)
}
}
}
}
} }

View File

@ -1,11 +1,8 @@
source 'https://github.com/CocoaPods/Specs.git' source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
use_frameworks! use_frameworks!
project 'RMRPullToRefreshExample.xcodeproj' target 'RMRPullToRefreshExample' do
workspace 'RMRPullToRefreshExample.xcworkspace' project 'RMRPullToRefreshExample.xcodeproj'
pod 'RMRPullToRefresh, :path => "../"
target :RMRPullToRefreshExample do
pod 'RMRPullToRefresh', :path => "../"
end end

View File

@ -1,16 +0,0 @@
PODS:
- RMRPullToRefresh (0.5.0)
DEPENDENCIES:
- RMRPullToRefresh (from `../`)
EXTERNAL SOURCES:
RMRPullToRefresh:
:path: ../
SPEC CHECKSUMS:
RMRPullToRefresh: 6c25f48af80d0e5d72b89ef5d6ea0dfcc21e5444
PODFILE CHECKSUM: 6bf08c33e827c034420f4dcfc61024a8ba7eab2f
COCOAPODS: 1.3.1

View File

@ -14,7 +14,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow? 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. // Override point for customization after application launch.
return true return true
} }

View File

@ -1,15 +1,5 @@
{ {
"images" : [ "images" : [
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "3x"
},
{ {
"idiom" : "iphone", "idiom" : "iphone",
"size" : "29x29", "size" : "29x29",
@ -39,11 +29,6 @@
"idiom" : "iphone", "idiom" : "iphone",
"size" : "60x60", "size" : "60x60",
"scale" : "3x" "scale" : "3x"
},
{
"idiom" : "ios-marketing",
"size" : "1024x1024",
"scale" : "1x"
} }
], ],
"info" : { "info" : {

View File

@ -1,12 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="9wl-A7-LQ4"> <document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10116" systemVersion="15E65" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="9wl-A7-LQ4">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies> <dependencies>
<deployment identifier="iOS"/> <deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies> </dependencies>
<scenes> <scenes>
<!--Navigation Controller--> <!--Navigation Controller-->
@ -14,9 +10,9 @@
<objects> <objects>
<navigationController id="9wl-A7-LQ4" sceneMemberID="viewController"> <navigationController id="9wl-A7-LQ4" sceneMemberID="viewController">
<navigationBar key="navigationBar" contentMode="scaleToFill" id="yyl-ZQ-eby"> <navigationBar key="navigationBar" contentMode="scaleToFill" id="yyl-ZQ-eby">
<rect key="frame" x="0.0" y="20" width="375" height="44"/> <rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<color key="tintColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="tintColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
</navigationBar> </navigationBar>
<connections> <connections>
<segue destination="oE2-vv-go7" kind="relationship" relationship="rootViewController" id="7GL-Am-OfG"/> <segue destination="oE2-vv-go7" kind="relationship" relationship="rootViewController" id="7GL-Am-OfG"/>
@ -24,79 +20,79 @@
</navigationController> </navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="jEm-VL-aI5" userLabel="First Responder" sceneMemberID="firstResponder"/> <placeholder placeholderIdentifier="IBFirstResponder" id="jEm-VL-aI5" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects> </objects>
<point key="canvasLocation" x="-503" y="323"/> <point key="canvasLocation" x="-363" y="324"/>
</scene> </scene>
<!--Table View Controller--> <!--Table View Controller-->
<scene sceneID="xmD-iM-370"> <scene sceneID="xmD-iM-370">
<objects> <objects>
<tableViewController id="oE2-vv-go7" customClass="TableViewController" customModule="RMRPullToRefreshExample" customModuleProvider="target" sceneMemberID="viewController"> <tableViewController id="oE2-vv-go7" customClass="TableViewController" customModule="RMRPullToRefreshExample" customModuleProvider="target" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="static" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="18" sectionFooterHeight="18" id="C22-ld-kpl"> <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="static" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="18" sectionFooterHeight="18" id="C22-ld-kpl">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/> <rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="0.93725490199999995" green="0.93725490199999995" blue="0.95686274510000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="backgroundColor" red="0.93725490199999995" green="0.93725490199999995" blue="0.95686274510000002" alpha="1" colorSpace="calibratedRGB"/>
<sections> <sections>
<tableViewSection headerTitle="Perekrestok" id="OAd-tH-sE5"> <tableViewSection headerTitle="Perekrestok" id="OAd-tH-sE5">
<cells> <cells>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="Qw1-Fc-VoV" detailTextLabel="nOn-mL-Lrw" imageView="6OD-og-tgv" style="IBUITableViewCellStyleValue1" id="Ig2-F0-5fB"> <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="Qw1-Fc-VoV" detailTextLabel="nOn-mL-Lrw" imageView="6OD-og-tgv" style="IBUITableViewCellStyleValue1" id="Ig2-F0-5fB">
<rect key="frame" x="0.0" y="55.5" width="375" height="44"/> <rect key="frame" x="0.0" y="113.5" width="600" height="44"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Ig2-F0-5fB" id="f8z-M3-Z4V"> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Ig2-F0-5fB" id="f8z-M3-Z4V">
<rect key="frame" x="0.0" y="0.0" width="341" height="43.5"/> <rect key="frame" x="0.0" y="0.0" width="567" height="43.5"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<subviews> <subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Perekrestok" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Qw1-Fc-VoV"> <label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Perekrestok" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Qw1-Fc-VoV">
<rect key="frame" x="75" y="12" width="86.5" height="19.5"/> <rect key="frame" x="74" y="12" width="86.5" height="19.5"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/> <fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Top" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="nOn-mL-Lrw"> <label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Top" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="nOn-mL-Lrw">
<rect key="frame" x="313" y="12" width="27" height="19.5"/> <rect key="frame" x="537.5" y="12" width="27.5" height="19.5"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/> <fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" red="0.55686274509803924" green="0.55686274509803924" blue="0.57647058823529407" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="textColor" red="0.55686274509803924" green="0.55686274509803924" blue="0.57647058823529407" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" image="perekrestok" id="6OD-og-tgv"> <imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" image="perekrestok" id="6OD-og-tgv">
<rect key="frame" x="16" y="0.0" width="44" height="43.5"/> <rect key="frame" x="15" y="0.0" width="44" height="43.5"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
</imageView> </imageView>
</subviews> </subviews>
</tableViewCellContentView> </tableViewCellContentView>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
<connections> <connections>
<segue destination="BYZ-38-t0r" kind="show" identifier="perekrestok_top" id="TFF-yS-c1s"/> <segue destination="BYZ-38-t0r" kind="show" identifier="perekrestok_top" id="TFF-yS-c1s"/>
</connections> </connections>
</tableViewCell> </tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="3b8-Kd-0Uw" detailTextLabel="U1K-Un-yBw" imageView="a26-Gq-xeL" style="IBUITableViewCellStyleValue1" id="EN2-bQ-yTK"> <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="3b8-Kd-0Uw" detailTextLabel="U1K-Un-yBw" imageView="a26-Gq-xeL" style="IBUITableViewCellStyleValue1" id="EN2-bQ-yTK">
<rect key="frame" x="0.0" y="99.5" width="375" height="44"/> <rect key="frame" x="0.0" y="157.5" width="600" height="44"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="EN2-bQ-yTK" id="YBm-bQ-aP7"> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="EN2-bQ-yTK" id="YBm-bQ-aP7">
<rect key="frame" x="0.0" y="0.0" width="341" height="43.5"/> <rect key="frame" x="0.0" y="0.0" width="567" height="43.5"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<subviews> <subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Perekrestok" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="3b8-Kd-0Uw"> <label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Perekrestok" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="3b8-Kd-0Uw">
<rect key="frame" x="75" y="12" width="86.5" height="19.5"/> <rect key="frame" x="74" y="12" width="86.5" height="19.5"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/> <fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Bottom" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="U1K-Un-yBw"> <label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Bottom" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="U1K-Un-yBw">
<rect key="frame" x="287" y="12" width="53" height="19.5"/> <rect key="frame" x="512" y="12" width="53" height="19.5"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/> <fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" red="0.55686274509803924" green="0.55686274509803924" blue="0.57647058823529407" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="textColor" red="0.55686274509803924" green="0.55686274509803924" blue="0.57647058823529407" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" image="perekrestok" id="a26-Gq-xeL"> <imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" image="perekrestok" id="a26-Gq-xeL">
<rect key="frame" x="16" y="0.0" width="44" height="43.5"/> <rect key="frame" x="15" y="0.0" width="44" height="43.5"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
</imageView> </imageView>
</subviews> </subviews>
</tableViewCellContentView> </tableViewCellContentView>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
<connections> <connections>
<segue destination="BYZ-38-t0r" kind="show" identifier="perekrestok_bottom" id="RNW-CJ-jxH"/> <segue destination="BYZ-38-t0r" kind="show" identifier="perekrestok_bottom" id="RNW-CJ-jxH"/>
</connections> </connections>
@ -106,28 +102,28 @@
<tableViewSection headerTitle="Beeline" id="Bp3-dz-9Zb"> <tableViewSection headerTitle="Beeline" id="Bp3-dz-9Zb">
<cells> <cells>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="HlT-ZI-pLV" detailTextLabel="Sne-Dt-pmd" imageView="IEL-Td-m6Q" style="IBUITableViewCellStyleValue1" id="t3C-cF-xlh"> <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="HlT-ZI-pLV" detailTextLabel="Sne-Dt-pmd" imageView="IEL-Td-m6Q" style="IBUITableViewCellStyleValue1" id="t3C-cF-xlh">
<rect key="frame" x="0.0" y="199.5" width="375" height="44"/> <rect key="frame" x="0.0" y="251.5" width="600" height="44"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="t3C-cF-xlh" id="5E2-Ik-tgT"> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="t3C-cF-xlh" id="5E2-Ik-tgT">
<rect key="frame" x="0.0" y="0.0" width="341" height="43.5"/> <rect key="frame" x="0.0" y="0.0" width="567" height="43.5"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<subviews> <subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Beeline" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="HlT-ZI-pLV"> <label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Beeline" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="HlT-ZI-pLV">
<rect key="frame" x="75" y="12" width="53.5" height="19.5"/> <rect key="frame" x="74" y="12" width="53.5" height="19.5"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/> <fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Top" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Sne-Dt-pmd"> <label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Top" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Sne-Dt-pmd">
<rect key="frame" x="313" y="12" width="27" height="19.5"/> <rect key="frame" x="537.5" y="12" width="27.5" height="19.5"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/> <fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" red="0.55686274509803924" green="0.55686274509803924" blue="0.57647058823529407" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="textColor" red="0.55686274509803924" green="0.55686274509803924" blue="0.57647058823529407" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" image="beeline" id="IEL-Td-m6Q"> <imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" image="beeline" id="IEL-Td-m6Q">
<rect key="frame" x="16" y="0.0" width="44" height="43.5"/> <rect key="frame" x="15" y="0.0" width="44" height="43.5"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
</imageView> </imageView>
</subviews> </subviews>
@ -137,28 +133,28 @@
</connections> </connections>
</tableViewCell> </tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="uHd-tI-cbh" detailTextLabel="Nfu-Qc-1Gp" imageView="NLI-8k-jWy" style="IBUITableViewCellStyleValue1" id="Qxr-CU-ozv"> <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="uHd-tI-cbh" detailTextLabel="Nfu-Qc-1Gp" imageView="NLI-8k-jWy" style="IBUITableViewCellStyleValue1" id="Qxr-CU-ozv">
<rect key="frame" x="0.0" y="243.5" width="375" height="44"/> <rect key="frame" x="0.0" y="295.5" width="600" height="44"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Qxr-CU-ozv" id="LDM-NR-x0D"> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Qxr-CU-ozv" id="LDM-NR-x0D">
<rect key="frame" x="0.0" y="0.0" width="341" height="43.5"/> <rect key="frame" x="0.0" y="0.0" width="567" height="43.5"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<subviews> <subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Beeline" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="uHd-tI-cbh"> <label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Beeline" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="uHd-tI-cbh">
<rect key="frame" x="75" y="12" width="53.5" height="19.5"/> <rect key="frame" x="74" y="12" width="53.5" height="19.5"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/> <fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Bottom" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Nfu-Qc-1Gp"> <label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Bottom" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Nfu-Qc-1Gp">
<rect key="frame" x="287" y="12" width="53" height="19.5"/> <rect key="frame" x="512" y="12" width="53" height="19.5"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/> <fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" red="0.55686274509803924" green="0.55686274509803924" blue="0.57647058823529407" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="textColor" red="0.55686274509803924" green="0.55686274509803924" blue="0.57647058823529407" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" image="beeline" id="NLI-8k-jWy"> <imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" image="beeline" id="NLI-8k-jWy">
<rect key="frame" x="16" y="0.0" width="44" height="43.5"/> <rect key="frame" x="15" y="0.0" width="44" height="43.5"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
</imageView> </imageView>
</subviews> </subviews>
@ -172,28 +168,28 @@
<tableViewSection headerTitle="Default" id="YNv-qE-Ndq"> <tableViewSection headerTitle="Default" id="YNv-qE-Ndq">
<cells> <cells>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="Hod-kU-jvC" detailTextLabel="MHK-Eb-EhW" imageView="LAe-1f-zZu" style="IBUITableViewCellStyleValue1" id="uGe-5R-mhz"> <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="Hod-kU-jvC" detailTextLabel="MHK-Eb-EhW" imageView="LAe-1f-zZu" style="IBUITableViewCellStyleValue1" id="uGe-5R-mhz">
<rect key="frame" x="0.0" y="343.5" width="375" height="44"/> <rect key="frame" x="0.0" y="389.5" width="600" height="44"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="uGe-5R-mhz" id="h7j-2o-NcK"> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="uGe-5R-mhz" id="h7j-2o-NcK">
<rect key="frame" x="0.0" y="0.0" width="341" height="43.5"/> <rect key="frame" x="0.0" y="0.0" width="567" height="43.5"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<subviews> <subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Redmadrobot" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Hod-kU-jvC"> <label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Redmadrobot" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Hod-kU-jvC">
<rect key="frame" x="75" y="12" width="99" height="19.5"/> <rect key="frame" x="74" y="12" width="99" height="19.5"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/> <fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Top" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="MHK-Eb-EhW"> <label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Top" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="MHK-Eb-EhW">
<rect key="frame" x="313" y="12" width="27" height="19.5"/> <rect key="frame" x="537.5" y="12" width="27.5" height="19.5"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/> <fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" red="0.5568627451" green="0.5568627451" blue="0.57647058819999997" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="textColor" red="0.5568627451" green="0.5568627451" blue="0.57647058819999997" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" image="redmadlogo-1" id="LAe-1f-zZu"> <imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" image="redmadlogo-1" id="LAe-1f-zZu">
<rect key="frame" x="16" y="0.0" width="44" height="43.5"/> <rect key="frame" x="15" y="0.0" width="44" height="43.5"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
</imageView> </imageView>
</subviews> </subviews>
@ -203,28 +199,28 @@
</connections> </connections>
</tableViewCell> </tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="PEJ-1c-whb" detailTextLabel="cmt-br-dNG" imageView="1iM-wK-6Uf" style="IBUITableViewCellStyleValue1" id="Mlu-1N-6jM"> <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="PEJ-1c-whb" detailTextLabel="cmt-br-dNG" imageView="1iM-wK-6Uf" style="IBUITableViewCellStyleValue1" id="Mlu-1N-6jM">
<rect key="frame" x="0.0" y="387.5" width="375" height="44"/> <rect key="frame" x="0.0" y="433.5" width="600" height="44"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Mlu-1N-6jM" id="Xfk-9c-f5n"> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Mlu-1N-6jM" id="Xfk-9c-f5n">
<rect key="frame" x="0.0" y="0.0" width="341" height="43.5"/> <rect key="frame" x="0.0" y="0.0" width="567" height="43.5"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<subviews> <subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Redmadrobot" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="PEJ-1c-whb"> <label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Redmadrobot" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="PEJ-1c-whb">
<rect key="frame" x="75" y="12" width="99" height="19.5"/> <rect key="frame" x="74" y="12" width="99" height="19.5"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/> <fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Bottom" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="cmt-br-dNG"> <label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Bottom" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="cmt-br-dNG">
<rect key="frame" x="287" y="12" width="53" height="19.5"/> <rect key="frame" x="512" y="12" width="53" height="19.5"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/> <fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" red="0.5568627451" green="0.5568627451" blue="0.57647058819999997" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="textColor" red="0.5568627451" green="0.5568627451" blue="0.57647058819999997" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" image="redmadlogo-1" id="1iM-wK-6Uf"> <imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" image="redmadlogo-1" id="1iM-wK-6Uf">
<rect key="frame" x="16" y="0.0" width="44" height="43.5"/> <rect key="frame" x="15" y="0.0" width="44" height="43.5"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
</imageView> </imageView>
</subviews> </subviews>
@ -245,7 +241,7 @@
</tableViewController> </tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="2e9-Jk-9A8" userLabel="First Responder" sceneMemberID="firstResponder"/> <placeholder placeholderIdentifier="IBFirstResponder" id="2e9-Jk-9A8" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects> </objects>
<point key="canvasLocation" x="143" y="323"/> <point key="canvasLocation" x="269" y="324"/>
</scene> </scene>
<!--View Controller--> <!--View Controller-->
<scene sceneID="tne-QT-ifu"> <scene sceneID="tne-QT-ifu">
@ -256,26 +252,26 @@
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/> <viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
</layoutGuides> </layoutGuides>
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC"> <view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/> <rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews> <subviews>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="none" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="qa0-J0-SDd"> <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="none" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="qa0-J0-SDd">
<rect key="frame" x="0.0" y="64" width="375" height="603"/> <rect key="frame" x="0.0" y="64" width="600" height="536"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<color key="separatorColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="separatorColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<prototypes> <prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" misplaced="YES" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="Cell" textLabel="pxY-0R-2l7" style="IBUITableViewCellStyleDefault" id="RzC-n2-Iry"> <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="Cell" textLabel="pxY-0R-2l7" style="IBUITableViewCellStyleDefault" id="RzC-n2-Iry">
<rect key="frame" x="0.0" y="28" width="375" height="44"/> <rect key="frame" x="0.0" y="28" width="600" height="44"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="RzC-n2-Iry" id="QD1-aM-jfC"> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="RzC-n2-Iry" id="QD1-aM-jfC">
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/> <rect key="frame" x="0.0" y="0.0" width="600" height="44"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<subviews> <subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Title" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="pxY-0R-2l7"> <label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Title" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="pxY-0R-2l7">
<rect key="frame" x="15" y="0.0" width="345" height="44"/> <rect key="frame" x="15" y="0.0" width="570" height="44"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/> <fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
</subviews> </subviews>
@ -288,7 +284,7 @@
</connections> </connections>
</tableView> </tableView>
</subviews> </subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints> <constraints>
<constraint firstItem="qa0-J0-SDd" firstAttribute="top" secondItem="8bC-Xf-vdC" secondAttribute="top" constant="64" id="6Du-Fj-JAv"/> <constraint firstItem="qa0-J0-SDd" firstAttribute="top" secondItem="8bC-Xf-vdC" secondAttribute="top" constant="64" id="6Du-Fj-JAv"/>
<constraint firstItem="qa0-J0-SDd" firstAttribute="leading" secondItem="8bC-Xf-vdC" secondAttribute="leading" id="ONC-Bk-CbX"/> <constraint firstItem="qa0-J0-SDd" firstAttribute="leading" secondItem="8bC-Xf-vdC" secondAttribute="leading" id="ONC-Bk-CbX"/>
@ -315,7 +311,7 @@
</viewController> </viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/> <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects> </objects>
<point key="canvasLocation" x="1111" y="323"/> <point key="canvasLocation" x="1011" y="324"/>
</scene> </scene>
</scenes> </scenes>
<resources> <resources>

View File

@ -23,7 +23,7 @@ class PerekrestokView: RMRPullToRefreshView {
// MARK: - Private // MARK: - Private
func angle(_ progress: CGFloat) -> CGFloat { func angle(_ progress: CGFloat) -> CGFloat {
return -.pi/progress return -CGFloat(M_PI)/progress
} }
// MARK: - RMRPullToRefreshViewProtocol // MARK: - RMRPullToRefreshViewProtocol
@ -39,7 +39,7 @@ class PerekrestokView: RMRPullToRefreshView {
override func beginLoadingAnimation() { override func beginLoadingAnimation() {
let rotationAnimation = CABasicAnimation(keyPath: "transform.rotation.z") let rotationAnimation = CABasicAnimation(keyPath: "transform.rotation.z")
rotationAnimation.fromValue = fromValue rotationAnimation.fromValue = fromValue
rotationAnimation.byValue = 2*Double.pi rotationAnimation.byValue = 2*M_PI
rotationAnimation.duration = 0.9 rotationAnimation.duration = 0.9
rotationAnimation.repeatCount = HUGE rotationAnimation.repeatCount = HUGE

View File

@ -8,8 +8,9 @@
import UIKit import UIKit
final class TableViewController: UITableViewController { class TableViewController: UITableViewController {
override func prepare(for segue: UIStoryboardSegue, sender: Any?) { override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
super.prepare(for: segue, sender: sender) super.prepare(for: segue, sender: sender)

View File

@ -18,48 +18,20 @@ public enum ExampleType: Int {
case redmadrobotBottom case redmadrobotBottom
} }
final class ViewController: UIViewController { class ViewController: UIViewController, UITableViewDataSource, UITableViewDelegate, UIActionSheetDelegate {
// MARK: - Public properties @IBOutlet weak var tableView: UITableView!
var exampleType: ExampleType = .beelineBottom var exampleType: ExampleType = .beelineBottom
// MARK: - Private properites var pullToRefresh: RMRPullToRefresh?
private var pullToRefresh: RMRPullToRefresh? let formatter = DateFormatter()
private let formatter = DateFormatter()
private var items: [String] = []
private var count = 2
private var result = RMRPullToRefreshResultType.success
// MARK: - IBOutlets var items: [String] = []
var count = 2
@IBOutlet weak var tableView: UITableView! var result = RMRPullToRefreshResultType.success
// MARK: - IBActions
@IBAction func settings(_ sender: AnyObject) {
let alertController = UIAlertController(title: "Result type", message: nil, preferredStyle: .actionSheet)
let successAction = UIAlertAction(title: "Success", style: .default) { _ in
self.result = .noUpdates
}
alertController.addAction(successAction)
let noUpdatesAction = UIAlertAction(title: "No updates", style: .default) { _ in
self.result = .noUpdates
}
alertController.addAction(noUpdatesAction)
let errorAction = UIAlertAction(title: "Error", style: .default) { _ in
self.result = .error
}
alertController.addAction(errorAction)
present(alertController, animated: true, completion: nil)
}
// MARK: - UIViewController
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
@ -72,9 +44,10 @@ final class ViewController: UIViewController {
// MARK: - Pull to Refresh // MARK: - Pull to Refresh
private func configurePullToRefresh() { func configurePullToRefresh() {
pullToRefresh = RMRPullToRefresh(scrollView: tableView, position: position()) { [weak self] in
DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 5, execute: { 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 { if self?.result == .success {
self?.loadMore() self?.loadMore()
} }
@ -84,35 +57,36 @@ final class ViewController: UIViewController {
}) })
} }
switch exampleType { if exampleType == .perekrestokTop || exampleType == .perekrestokBottom {
case .perekrestokTop, .perekrestokBottom:
perekrestok() perekrestok()
case .beelineTop, .beelineBottom: } else if exampleType == .beelineTop || exampleType == .beelineBottom {
beeline() beeline()
case .redmadrobotTop, .redmadrobotBottom: } else if exampleType == .redmadrobotTop || exampleType == .redmadrobotBottom {
redmadrobot() redmadrobot()
} }
//pullToRefresh?.setHideDelay(5.0, result: .success) pullToRefresh?.setHideDelay(5.0, result: .success)
//pullToRefresh?.hideWhenError = false
pullToRefresh?.hideWhenError = false
} }
// MARK: - Build example values // MARK: - Build example values
private func perekrestok() { func perekrestok() {
if let pullToRefreshView = PerekrestokView.XIB_VIEW() { if let pullToRefreshView = PerekrestokView.XIB_VIEW() {
pullToRefresh?.configureView(pullToRefreshView, state: .dragging, result: .success) pullToRefresh?.configureView(pullToRefreshView, state: .dragging, result: .success)
pullToRefresh?.configureView(pullToRefreshView, state: .loading, result: .success) pullToRefresh?.configureView(pullToRefreshView, state: .loading, result: .success)
} }
pullToRefresh?.height = 90.0 pullToRefresh?.height = 90.0
pullToRefresh?.backgroundColor = UIColor( pullToRefresh?.backgroundColor = UIColor(red: 16.0/255.0,
red: 16.0/255.0, green: 192.0/255.0,
green: 192.0/255.0, blue: 119.0/255.0,
blue: 119.0/255.0, alpha: 1.0)
alpha: 1.0)
} }
private func beeline() { func beeline() {
if let pullToRefreshView = BeelineView.XIB_VIEW() { if let pullToRefreshView = BeelineView.XIB_VIEW() {
pullToRefresh?.configureView(pullToRefreshView, state: .dragging, result: .success) pullToRefresh?.configureView(pullToRefreshView, state: .dragging, result: .success)
pullToRefresh?.configureView(pullToRefreshView, state: .loading, result: .success) pullToRefresh?.configureView(pullToRefreshView, state: .loading, result: .success)
@ -121,11 +95,11 @@ final class ViewController: UIViewController {
pullToRefresh?.backgroundColor = UIColor.white pullToRefresh?.backgroundColor = UIColor.white
} }
private func redmadrobot() { func redmadrobot() {
pullToRefresh?.setupDefaultSettings() pullToRefresh?.setupDefaultSettings()
} }
private func position() -> RMRPullToRefreshPosition { func position() -> RMRPullToRefreshPosition {
if exampleType == .perekrestokTop || exampleType == .beelineTop || exampleType == .redmadrobotTop { if exampleType == .perekrestokTop || exampleType == .beelineTop || exampleType == .redmadrobotTop {
return .top return .top
} }
@ -134,29 +108,49 @@ final class ViewController: UIViewController {
// MARK: - Configure // MARK: - Configure
private func someConfiguring() { func someConfiguring() {
formatter.dateStyle = DateFormatter.Style.long formatter.dateStyle = DateFormatter.Style.long
formatter.timeStyle = .medium formatter.timeStyle = .medium
} }
// MARK: - Action
@IBAction func settings(_ sender: AnyObject) {
UIActionSheet(title: "Result type", delegate: self, cancelButtonTitle: nil, destructiveButtonTitle: nil, otherButtonTitles: ".Success", ".NoUpdates", ".Error").show(in: self.view)
}
// MARK: - UIActionSheetDelegate
func actionSheet(_ actionSheet: UIActionSheet, clickedButtonAt buttonIndex: Int) {
switch buttonIndex {
case 0:
self.result = .success
case 1:
self.result = .noUpdates
case 2:
self.result = .error
default:
break;
}
}
// MARK: - Test data // MARK: - Test data
private func loadData() { func loadData() {
for _ in 0...count { for _ in 0...count {
items.append(formatter.string(from: Date())) items.append(formatter.string(from: Date()))
} }
} }
private func loadMore() { func loadMore() {
for _ in 0...20 { for _ in 0...20 {
self.items.append(formatter.string(from: Date(timeIntervalSinceNow: 20))) self.items.append(formatter.string(from: Date(timeIntervalSinceNow: 20)))
} }
self.tableView.reloadData() self.tableView.reloadData()
} }
}
// MARK: - TableView
// MARK: - UITableViewDataSource
extension ViewController: UITableViewDataSource {
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath) let cell = tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath)
@ -172,3 +166,4 @@ extension ViewController: UITableViewDataSource {
return 1; return 1;
} }
} }

View File

@ -132,6 +132,7 @@
89CB12311C9DA07B00048E46 /* Frameworks */, 89CB12311C9DA07B00048E46 /* Frameworks */,
89CB12321C9DA07B00048E46 /* Resources */, 89CB12321C9DA07B00048E46 /* Resources */,
2BE863C51DEA329C1234F1B0 /* [CP] Embed Pods Frameworks */, 2BE863C51DEA329C1234F1B0 /* [CP] Embed Pods Frameworks */,
C137BE069515EFF1A69455DF /* [CP] Copy Pods Resources */,
); );
buildRules = ( buildRules = (
); );
@ -149,12 +150,12 @@
isa = PBXProject; isa = PBXProject;
attributes = { attributes = {
LastSwiftUpdateCheck = 0720; LastSwiftUpdateCheck = 0720;
LastUpgradeCheck = 1000; LastUpgradeCheck = 0720;
ORGANIZATIONNAME = "Merkulov Ilya"; ORGANIZATIONNAME = "Merkulov Ilya";
TargetAttributes = { TargetAttributes = {
89CB12331C9DA07B00048E46 = { 89CB12331C9DA07B00048E46 = {
CreatedOnToolsVersion = 7.2.1; CreatedOnToolsVersion = 7.2.1;
LastSwiftMigration = 0920; LastSwiftMigration = 0800;
}; };
}; };
}; };
@ -198,16 +199,13 @@
files = ( files = (
); );
inputPaths = ( inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
); );
name = "[CP] Check Pods Manifest.lock"; name = "[CP] Check Pods Manifest.lock";
outputPaths = ( outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-RMRPullToRefreshExample-checkManifestLockResult.txt",
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh; 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; showEnvVarsInLog = 0;
}; };
2BE863C51DEA329C1234F1B0 /* [CP] Embed Pods Frameworks */ = { 2BE863C51DEA329C1234F1B0 /* [CP] Embed Pods Frameworks */ = {
@ -216,18 +214,30 @@
files = ( files = (
); );
inputPaths = ( inputPaths = (
"${SRCROOT}/Pods/Target Support Files/Pods-RMRPullToRefreshExample/Pods-RMRPullToRefreshExample-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/RMRPullToRefresh/RMRPullToRefresh.framework",
); );
name = "[CP] Embed Pods Frameworks"; name = "[CP] Embed Pods Frameworks";
outputPaths = ( outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RMRPullToRefresh.framework",
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh; shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-RMRPullToRefreshExample/Pods-RMRPullToRefreshExample-frameworks.sh\"\n"; shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-RMRPullToRefreshExample/Pods-RMRPullToRefreshExample-frameworks.sh\"\n";
showEnvVarsInLog = 0; 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 */ /* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */
@ -273,23 +283,13 @@
CLANG_CXX_LIBRARY = "libc++"; CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES; CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = 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_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_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
@ -311,7 +311,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0; IPHONEOS_DEPLOYMENT_TARGET = 9.2;
MTL_ENABLE_DEBUG_INFO = YES; MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES; ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos; SDKROOT = iphoneos;
@ -327,23 +327,13 @@
CLANG_CXX_LIBRARY = "libc++"; CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES; CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = 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_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_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
@ -359,10 +349,9 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0; IPHONEOS_DEPLOYMENT_TARGET = 9.2;
MTL_ENABLE_DEBUG_INFO = NO; MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos; SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
VALIDATE_PRODUCT = YES; VALIDATE_PRODUCT = YES;
}; };
name = Release; name = Release;
@ -372,14 +361,12 @@
baseConfigurationReference = 51A8D36C5CCC1E18D2666CD6 /* Pods-RMRPullToRefreshExample.debug.xcconfig */; baseConfigurationReference = 51A8D36C5CCC1E18D2666CD6 /* Pods-RMRPullToRefreshExample.debug.xcconfig */;
buildSettings = { buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = GMD7EK7S94;
FRAMEWORK_SEARCH_PATHS = "$(inherited)"; FRAMEWORK_SEARCH_PATHS = "$(inherited)";
INFOPLIST_FILE = RMRPullToRefresh/Info.plist; INFOPLIST_FILE = RMRPullToRefresh/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.redmadrobot.RMRPullToRefresh; PRODUCT_BUNDLE_IDENTIFIER = com.redmadrobot.RMRPullToRefresh;
PRODUCT_NAME = RMRPullToRefreshExample; PRODUCT_NAME = RMRPullToRefreshExample;
SWIFT_VERSION = 4.2; SWIFT_VERSION = 3.0;
}; };
name = Debug; name = Debug;
}; };
@ -388,14 +375,12 @@
baseConfigurationReference = 9373B01A0C7A0314295D05D2 /* Pods-RMRPullToRefreshExample.release.xcconfig */; baseConfigurationReference = 9373B01A0C7A0314295D05D2 /* Pods-RMRPullToRefreshExample.release.xcconfig */;
buildSettings = { buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = GMD7EK7S94;
FRAMEWORK_SEARCH_PATHS = "$(inherited)"; FRAMEWORK_SEARCH_PATHS = "$(inherited)";
INFOPLIST_FILE = RMRPullToRefresh/Info.plist; INFOPLIST_FILE = RMRPullToRefresh/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.redmadrobot.RMRPullToRefresh; PRODUCT_BUNDLE_IDENTIFIER = com.redmadrobot.RMRPullToRefresh;
PRODUCT_NAME = RMRPullToRefreshExample; PRODUCT_NAME = RMRPullToRefreshExample;
SWIFT_VERSION = 4.2; SWIFT_VERSION = 3.0;
}; };
name = Release; name = Release;
}; };

View File

@ -12,7 +12,7 @@
Как установить? Как установить?
-------- --------
`pod 'RMRPullToRefresh', :git => "git@git.redmadrobot.com:helper-ios/RMRPullToRefresh.git"` `pod 'RMRPullToRefresh', :git => "git@git.redmadrobot.com:im/RMRPullToRefresh.git"`
Как добавить? Как добавить?
-------- --------

View File

@ -1,12 +1,12 @@
Pod::Spec.new do |spec| Pod::Spec.new do |spec|
spec.name = "RMRPullToRefresh" spec.name = "RMRPullToRefresh"
spec.version = "0.8.0" spec.version = "0.2"
spec.platform = :ios, "9.0" spec.platform = :ios, "8.0"
spec.license = { :type => "MIT", :file => "LICENSE" } spec.license = { :type => "MIT", :file => "LICENSE" }
spec.summary = "A pull to refresh control for UIScrollView (UITableView and UICollectionView)" spec.summary = "A pull to refresh control for UIScrollView (UITableView and UICollectionView)"
spec.homepage = "http://redmadrobot.com/" spec.homepage = "http://redmadrobot.com/"
spec.author = "Ilya Merkulov" spec.author = "Ilya Merkulov"
spec.source = { :git => "https://git.redmadrobot.com/helper-ios/RMRPullToRefresh.git", :tag => spec.version } spec.source = { :git => :"https://git.redmadrobot.com/helper-ios/RMRPullToRefresh.git", :tag => "v0.2" }
spec.source_files = "Classes/*.{swift}", "Classes/Default/*.{swift}" spec.source_files = "Classes/*.{swift}", "Classes/Default/*.{swift}"
spec.resources = ['Images/*.png'] spec.resources = ['Images/*.png']
end end