Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
  • 9 commits
  • 16 files changed
  • 0 commit comments
  • 2 contributors
View
7 .gitignore
@@ -13,3 +13,10 @@ build/*
xcuserdata
profile
*.moved-aside
+
+DerivedData/
+
+
+# CocoaPods
+Pods/
+
View
8 JMStatefulTableViewController.podspec
@@ -1,13 +1,13 @@
Pod::Spec.new do |s|
s.name = 'JMStatefulTableViewController'
- s.version = '0.1.0'
+ s.version = '0.1.1'
s.summary = 'A subclassable table view controller with empty, loading and error states, also supports infinte-scrolling and pull to refresh.'
s.description = 'A subclass-able way to cleanly and neatly implement a table view controller that has empty, loading and error states. Supports "paging" and pull to to refresh thanks to SVPullToRefresh.'
s.homepage = 'https://github.com/jakemarsh/JMStatefulTableViewController'
s.authors = { 'Jake Marsh' => 'jake@deallocatedobjects.com' }
- s.source = { :git => 'https://github.com/jakemarsh/JMStatefulTableViewController.git', :tag => '0.1.0' }
+ s.source = { :git => 'https://github.com/jakemarsh/JMStatefulTableViewController.git', :tag => '0.1.1' }
s.platform = :ios
s.requires_arc = true
@@ -19,5 +19,5 @@ Pod::Spec.new do |s|
s.source_files = ['JMStatefulTableViewController/*.*']
- s.dependency 'SVPullToRefresh'
-end
+ s.dependency 'SVPullToRefresh', :git => 'git://github.com/samvermette/SVPullToRefresh.git', :commit => '1362d86a52a53baa96cbd4e15ad46d50418fe4fa'
+end
View
3  Podfile
@@ -1,3 +1,4 @@
platform :ios
-pod 'SVPullToRefresh'
+pod 'SVPullToRefresh', :git => 'git://github.com/samvermette/SVPullToRefresh.git', :commit => '1362d86a52a53baa96cbd4e15ad46d50418fe4fa'
+
View
16 Podfile.lock
@@ -1,5 +1,17 @@
+
PODS:
- - SVPullToRefresh (0.2)
+- SVPullToRefresh (0.2)
DEPENDENCIES:
- - SVPullToRefresh
+- SVPullToRefresh (from `git://github.com/samvermette/SVPullToRefresh.git', commit
+ `1362d86a52a53baa96cbd4e15ad46d50418fe4fa')
+
+EXTERNAL SOURCES:
+ SVPullToRefresh:
+ :git: git://github.com/samvermette/SVPullToRefresh.git
+ :commit: 1362d86a52a53baa96cbd4e15ad46d50418fe4fa
+
+SPEC CHECKSUMS:
+ SVPullToRefresh: d95803a9816d3919378ede69342c54927fb953ea
+
+COCOAPODS: 0.16.0
View
1  Pods/Headers/SVPullToRefresh/SVPullToRefresh.h
View
13 Pods/Pods-Acknowledgements.markdown
@@ -1,13 +0,0 @@
-# Acknowledgements
-This application makes use of the following third party libraries:
-
-## SVPullToRefresh
-
-Copyright (C) 2012 Sam Vermette
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-Generated by CocoaPods - http://cocoapods.org
View
43 Pods/Pods-Acknowledgements.plist
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>PreferenceSpecifiers</key>
- <array>
- <dict>
- <key>FooterText</key>
- <string>This application makes use of the following third party libraries:</string>
- <key>Title</key>
- <string>Acknowledgements</string>
- <key>Type</key>
- <string>PSGroupSpecifier</string>
- </dict>
- <dict>
- <key>FooterText</key>
- <string>Copyright (C) 2012 Sam Vermette
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</string>
- <key>Title</key>
- <string>SVPullToRefresh</string>
- <key>Type</key>
- <string>PSGroupSpecifier</string>
- </dict>
- <dict>
- <key>FooterText</key>
- <string>Generated by CocoaPods - http://cocoapods.org</string>
- <key>Title</key>
- <string></string>
- <key>Type</key>
- <string>PSGroupSpecifier</string>
- </dict>
- </array>
- <key>StringsTable</key>
- <string>Acknowledgements</string>
- <key>Title</key>
- <string>Acknowledgements</string>
-</dict>
-</plist>
View
3  Pods/Pods-prefix.pch
@@ -1,3 +0,0 @@
-#ifdef __OBJC__
-#import <UIKit/UIKit.h>
-#endif
View
19 Pods/Pods-resources.sh
@@ -1,19 +0,0 @@
-#!/bin/sh
-
-install_resource()
-{
- case $1 in
- *.storyboard)
- echo "ibtool --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename $1 .storyboard`.storyboardc ${PODS_ROOT}/$1 --sdk ${SDKROOT}"
- ibtool --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename $1 .storyboard`.storyboardc" "${PODS_ROOT}/$1" --sdk "${SDKROOT}"
- ;;
- *.xib)
- echo "ibtool --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename $1 .xib`.nib ${PODS_ROOT}/$1 --sdk ${SDKROOT}"
- ibtool --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename $1 .xib`.nib" "${PODS_ROOT}/$1" --sdk "${SDKROOT}"
- ;;
- *)
- echo "cp -R ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
- cp -R "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
- ;;
- esac
-}
View
4 Pods/Pods.xcconfig
@@ -1,4 +0,0 @@
-PODS_ROOT = ${SRCROOT}/Pods
-ALWAYS_SEARCH_USER_PATHS = YES
-OTHER_LDFLAGS = -ObjC -framework QuartzCore
-HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers" "${PODS_ROOT}/Headers/SVPullToRefresh"
View
513 Pods/Pods.xcodeproj/project.pbxproj
@@ -1,513 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>archiveVersion</key>
- <string>1</string>
- <key>classes</key>
- <dict/>
- <key>objectVersion</key>
- <string>46</string>
- <key>objects</key>
- <dict>
- <key>0272662672224E52A122B496</key>
- <dict>
- <key>includeInIndex</key>
- <string>1</string>
- <key>isa</key>
- <string>PBXFileReference</string>
- <key>lastKnownFileType</key>
- <string>text.xcconfig</string>
- <key>name</key>
- <string>Pods.xcconfig</string>
- <key>path</key>
- <string>Pods.xcconfig</string>
- <key>sourceTree</key>
- <string>SOURCE_ROOT</string>
- </dict>
- <key>06CE84405262413184175257</key>
- <dict>
- <key>children</key>
- <array>
- <string>345DB225A49745EDB6634FA7</string>
- </array>
- <key>isa</key>
- <string>PBXGroup</string>
- <key>name</key>
- <string>Frameworks</string>
- <key>sourceTree</key>
- <string>&lt;group&gt;</string>
- </dict>
- <key>06F26E7387974087931AE506</key>
- <dict>
- <key>baseConfigurationReference</key>
- <string>0272662672224E52A122B496</string>
- <key>buildSettings</key>
- <dict>
- <key>ALWAYS_SEARCH_USER_PATHS</key>
- <string>NO</string>
- <key>ARCHS</key>
- <string>$(ARCHS_STANDARD_32_BIT)</string>
- <key>COPY_PHASE_STRIP</key>
- <string>YES</string>
- <key>DSTROOT</key>
- <string>/tmp/xcodeproj.dst</string>
- <key>GCC_C_LANGUAGE_STANDARD</key>
- <string>gnu99</string>
- <key>GCC_PRECOMPILE_PREFIX_HEADER</key>
- <string>YES</string>
- <key>GCC_PREFIX_HEADER</key>
- <string>Pods-prefix.pch</string>
- <key>GCC_VERSION</key>
- <string>com.apple.compilers.llvm.clang.1_0</string>
- <key>INSTALL_PATH</key>
- <string>$(BUILT_PRODUCTS_DIR)</string>
- <key>IPHONEOS_DEPLOYMENT_TARGET</key>
- <string>4.3</string>
- <key>OTHER_LDFLAGS</key>
- <string></string>
- <key>PODS_ROOT</key>
- <string>${SRCROOT}</string>
- <key>PRODUCT_NAME</key>
- <string>$(TARGET_NAME)</string>
- <key>PUBLIC_HEADERS_FOLDER_PATH</key>
- <string>$(TARGET_NAME)</string>
- <key>SDKROOT</key>
- <string>iphoneos</string>
- <key>SKIP_INSTALL</key>
- <string>YES</string>
- <key>VALIDATE_PRODUCT</key>
- <string>YES</string>
- </dict>
- <key>isa</key>
- <string>XCBuildConfiguration</string>
- <key>name</key>
- <string>Release</string>
- </dict>
- <key>0DF68EE4CD934F3AB5BB622D</key>
- <dict>
- <key>fileRef</key>
- <string>8C230E0D235B4216BD392C89</string>
- <key>isa</key>
- <string>PBXBuildFile</string>
- <key>settings</key>
- <dict>
- <key>ATTRIBUTES</key>
- <array>
- <string>Public</string>
- </array>
- </dict>
- </dict>
- <key>0E2F997A3B4F42CF8C5C3F05</key>
- <dict>
- <key>children</key>
- <array>
- <string>D9A00A9635F74362AEB9E7F7</string>
- </array>
- <key>isa</key>
- <string>PBXGroup</string>
- <key>name</key>
- <string>Products</string>
- <key>sourceTree</key>
- <string>&lt;group&gt;</string>
- </dict>
- <key>13C098D95FBF4B53B7AA9CE9</key>
- <dict>
- <key>buildConfigurations</key>
- <array>
- <string>F92044E35030468584E0C083</string>
- <string>3F678EDA9F074B8C94736C4B</string>
- </array>
- <key>defaultConfigurationIsVisible</key>
- <string>0</string>
- <key>defaultConfigurationName</key>
- <string>Release</string>
- <key>isa</key>
- <string>XCConfigurationList</string>
- </dict>
- <key>17CEED162E50412DA5FC1FA8</key>
- <dict>
- <key>attributes</key>
- <dict>
- <key>LastUpgradeCheck</key>
- <string>0420</string>
- </dict>
- <key>buildConfigurationList</key>
- <string>13C098D95FBF4B53B7AA9CE9</string>
- <key>compatibilityVersion</key>
- <string>Xcode 3.2</string>
- <key>developmentRegion</key>
- <string>English</string>
- <key>hasScannedForEncodings</key>
- <string>0</string>
- <key>isa</key>
- <string>PBXProject</string>
- <key>knownRegions</key>
- <array>
- <string>en</string>
- </array>
- <key>mainGroup</key>
- <string>1F8DEE53AC184706911C7CF2</string>
- <key>productRefGroup</key>
- <string>0E2F997A3B4F42CF8C5C3F05</string>
- <key>projectDirPath</key>
- <string></string>
- <key>projectRoot</key>
- <string></string>
- <key>targets</key>
- <array>
- <string>BF47157121D2401DAC29907C</string>
- </array>
- </dict>
- <key>1991908B6F554095A34F1B09</key>
- <dict>
- <key>fileRef</key>
- <string>4A8EACF8D7B149759DA3A209</string>
- <key>isa</key>
- <string>PBXBuildFile</string>
- <key>settings</key>
- <dict>
- <key>COMPILER_FLAGS</key>
- <string>-fobjc-arc</string>
- </dict>
- </dict>
- <key>1F8DEE53AC184706911C7CF2</key>
- <dict>
- <key>children</key>
- <array>
- <string>0E2F997A3B4F42CF8C5C3F05</string>
- <string>53922892725746F1809BE9BD</string>
- <string>73338134C17D4F3785434870</string>
- <string>06CE84405262413184175257</string>
- </array>
- <key>isa</key>
- <string>PBXGroup</string>
- <key>sourceTree</key>
- <string>&lt;group&gt;</string>
- </dict>
- <key>26C6ECA3D85B4F05A600D5A4</key>
- <dict>
- <key>baseConfigurationReference</key>
- <string>0272662672224E52A122B496</string>
- <key>buildSettings</key>
- <dict>
- <key>ALWAYS_SEARCH_USER_PATHS</key>
- <string>NO</string>
- <key>ARCHS</key>
- <string>$(ARCHS_STANDARD_32_BIT)</string>
- <key>COPY_PHASE_STRIP</key>
- <string>NO</string>
- <key>DSTROOT</key>
- <string>/tmp/xcodeproj.dst</string>
- <key>GCC_C_LANGUAGE_STANDARD</key>
- <string>gnu99</string>
- <key>GCC_DYNAMIC_NO_PIC</key>
- <string>NO</string>
- <key>GCC_OPTIMIZATION_LEVEL</key>
- <string>0</string>
- <key>GCC_PRECOMPILE_PREFIX_HEADER</key>
- <string>YES</string>
- <key>GCC_PREFIX_HEADER</key>
- <string>Pods-prefix.pch</string>
- <key>GCC_PREPROCESSOR_DEFINITIONS</key>
- <array>
- <string>DEBUG=1</string>
- <string>$(inherited)</string>
- </array>
- <key>GCC_SYMBOLS_PRIVATE_EXTERN</key>
- <string>NO</string>
- <key>GCC_VERSION</key>
- <string>com.apple.compilers.llvm.clang.1_0</string>
- <key>INSTALL_PATH</key>
- <string>$(BUILT_PRODUCTS_DIR)</string>
- <key>IPHONEOS_DEPLOYMENT_TARGET</key>
- <string>4.3</string>
- <key>OTHER_LDFLAGS</key>
- <string></string>
- <key>PODS_ROOT</key>
- <string>${SRCROOT}</string>
- <key>PRODUCT_NAME</key>
- <string>$(TARGET_NAME)</string>
- <key>PUBLIC_HEADERS_FOLDER_PATH</key>
- <string>$(TARGET_NAME)</string>
- <key>SDKROOT</key>
- <string>iphoneos</string>
- <key>SKIP_INSTALL</key>
- <string>YES</string>
- </dict>
- <key>isa</key>
- <string>XCBuildConfiguration</string>
- <key>name</key>
- <string>Debug</string>
- </dict>
- <key>345DB225A49745EDB6634FA7</key>
- <dict>
- <key>includeInIndex</key>
- <string>1</string>
- <key>isa</key>
- <string>PBXFileReference</string>
- <key>lastKnownFileType</key>
- <string>wrapper.framework</string>
- <key>name</key>
- <string>Foundation.framework</string>
- <key>path</key>
- <string>System/Library/Frameworks/Foundation.framework</string>
- <key>sourceTree</key>
- <string>SDKROOT</string>
- </dict>
- <key>3F678EDA9F074B8C94736C4B</key>
- <dict>
- <key>buildSettings</key>
- <dict/>
- <key>isa</key>
- <string>XCBuildConfiguration</string>
- <key>name</key>
- <string>Release</string>
- </dict>
- <key>4A8EACF8D7B149759DA3A209</key>
- <dict>
- <key>includeInIndex</key>
- <string>1</string>
- <key>isa</key>
- <string>PBXFileReference</string>
- <key>name</key>
- <string>SVPullToRefresh.m</string>
- <key>path</key>
- <string>SVPullToRefresh/SVPullToRefresh/SVPullToRefresh.m</string>
- <key>sourceTree</key>
- <string>SOURCE_ROOT</string>
- </dict>
- <key>53922892725746F1809BE9BD</key>
- <dict>
- <key>children</key>
- <array>
- <string>A6E74B791326477C96AE8E1F</string>
- </array>
- <key>isa</key>
- <string>PBXGroup</string>
- <key>name</key>
- <string>Pods</string>
- <key>sourceTree</key>
- <string>&lt;group&gt;</string>
- </dict>
- <key>54113CFB8814408B978F0CA1</key>
- <dict>
- <key>children</key>
- <array>
- <string>61C340E90D7249818E279A95</string>
- <string>F44D9CDDE7E240B1B74209D4</string>
- <string>0272662672224E52A122B496</string>
- </array>
- <key>isa</key>
- <string>PBXGroup</string>
- <key>name</key>
- <string>Pods</string>
- <key>sourceTree</key>
- <string>&lt;group&gt;</string>
- </dict>
- <key>59929D7EF0684144A879B2BD</key>
- <dict>
- <key>buildActionMask</key>
- <string>2147483647</string>
- <key>dstPath</key>
- <string>$(PRODUCT_NAME)</string>
- <key>dstSubfolderSpec</key>
- <string>16</string>
- <key>files</key>
- <array>
- <string>0DF68EE4CD934F3AB5BB622D</string>
- </array>
- <key>isa</key>
- <string>PBXCopyFilesBuildPhase</string>
- <key>runOnlyForDeploymentPostprocessing</key>
- <string>0</string>
- </dict>
- <key>61C340E90D7249818E279A95</key>
- <dict>
- <key>includeInIndex</key>
- <string>1</string>
- <key>isa</key>
- <string>PBXFileReference</string>
- <key>name</key>
- <string>Pods-resources.sh</string>
- <key>path</key>
- <string>Pods-resources.sh</string>
- <key>sourceTree</key>
- <string>SOURCE_ROOT</string>
- </dict>
- <key>73338134C17D4F3785434870</key>
- <dict>
- <key>children</key>
- <array>
- <string>54113CFB8814408B978F0CA1</string>
- <string>BA833F4CE0754AB585E0B9A1</string>
- </array>
- <key>isa</key>
- <string>PBXGroup</string>
- <key>name</key>
- <string>Targets Support Files</string>
- <key>sourceTree</key>
- <string>&lt;group&gt;</string>
- </dict>
- <key>8C230E0D235B4216BD392C89</key>
- <dict>
- <key>includeInIndex</key>
- <string>1</string>
- <key>isa</key>
- <string>PBXFileReference</string>
- <key>name</key>
- <string>SVPullToRefresh.h</string>
- <key>path</key>
- <string>SVPullToRefresh/SVPullToRefresh/SVPullToRefresh.h</string>
- <key>sourceTree</key>
- <string>SOURCE_ROOT</string>
- </dict>
- <key>9B97F0AEBC2E445D8845CE01</key>
- <dict>
- <key>fileRef</key>
- <string>BA833F4CE0754AB585E0B9A1</string>
- <key>isa</key>
- <string>PBXBuildFile</string>
- </dict>
- <key>A5E3ADED6373400FB592186F</key>
- <dict>
- <key>buildActionMask</key>
- <string>2147483647</string>
- <key>files</key>
- <array>
- <string>E956A46EF736415AAD357965</string>
- </array>
- <key>isa</key>
- <string>PBXFrameworksBuildPhase</string>
- <key>runOnlyForDeploymentPostprocessing</key>
- <string>0</string>
- </dict>
- <key>A6E74B791326477C96AE8E1F</key>
- <dict>
- <key>children</key>
- <array>
- <string>8C230E0D235B4216BD392C89</string>
- <string>4A8EACF8D7B149759DA3A209</string>
- </array>
- <key>isa</key>
- <string>PBXGroup</string>
- <key>name</key>
- <string>SVPullToRefresh</string>
- <key>sourceTree</key>
- <string>&lt;group&gt;</string>
- </dict>
- <key>B24C605C320149DC9BD7A762</key>
- <dict>
- <key>buildConfigurations</key>
- <array>
- <string>26C6ECA3D85B4F05A600D5A4</string>
- <string>06F26E7387974087931AE506</string>
- </array>
- <key>defaultConfigurationIsVisible</key>
- <string>0</string>
- <key>defaultConfigurationName</key>
- <string>Release</string>
- <key>isa</key>
- <string>XCConfigurationList</string>
- </dict>
- <key>BA833F4CE0754AB585E0B9A1</key>
- <dict>
- <key>includeInIndex</key>
- <string>1</string>
- <key>isa</key>
- <string>PBXFileReference</string>
- <key>name</key>
- <string>PodsDummy_Pods.m</string>
- <key>path</key>
- <string>PodsDummy_Pods.m</string>
- <key>sourceTree</key>
- <string>SOURCE_ROOT</string>
- </dict>
- <key>BF47157121D2401DAC29907C</key>
- <dict>
- <key>buildConfigurationList</key>
- <string>B24C605C320149DC9BD7A762</string>
- <key>buildPhases</key>
- <array>
- <string>DA12E38EFD60438099009E6F</string>
- <string>59929D7EF0684144A879B2BD</string>
- <string>A5E3ADED6373400FB592186F</string>
- </array>
- <key>buildRules</key>
- <array/>
- <key>dependencies</key>
- <array/>
- <key>isa</key>
- <string>PBXNativeTarget</string>
- <key>name</key>
- <string>Pods</string>
- <key>productName</key>
- <string>Pods</string>
- <key>productReference</key>
- <string>D9A00A9635F74362AEB9E7F7</string>
- <key>productType</key>
- <string>com.apple.product-type.library.static</string>
- </dict>
- <key>D9A00A9635F74362AEB9E7F7</key>
- <dict>
- <key>explicitFileType</key>
- <string>archive.ar</string>
- <key>includeInIndex</key>
- <string>0</string>
- <key>isa</key>
- <string>PBXFileReference</string>
- <key>name</key>
- <string>libPods.a</string>
- <key>path</key>
- <string>libPods.a</string>
- <key>sourceTree</key>
- <string>BUILT_PRODUCTS_DIR</string>
- </dict>
- <key>DA12E38EFD60438099009E6F</key>
- <dict>
- <key>buildActionMask</key>
- <string>2147483647</string>
- <key>files</key>
- <array>
- <string>1991908B6F554095A34F1B09</string>
- <string>9B97F0AEBC2E445D8845CE01</string>
- </array>
- <key>isa</key>
- <string>PBXSourcesBuildPhase</string>
- <key>runOnlyForDeploymentPostprocessing</key>
- <string>0</string>
- </dict>
- <key>E956A46EF736415AAD357965</key>
- <dict>
- <key>fileRef</key>
- <string>345DB225A49745EDB6634FA7</string>
- <key>isa</key>
- <string>PBXBuildFile</string>
- </dict>
- <key>F44D9CDDE7E240B1B74209D4</key>
- <dict>
- <key>includeInIndex</key>
- <string>1</string>
- <key>isa</key>
- <string>PBXFileReference</string>
- <key>name</key>
- <string>Pods-prefix.pch</string>
- <key>path</key>
- <string>Pods-prefix.pch</string>
- <key>sourceTree</key>
- <string>SOURCE_ROOT</string>
- </dict>
- <key>F92044E35030468584E0C083</key>
- <dict>
- <key>buildSettings</key>
- <dict/>
- <key>isa</key>
- <string>XCBuildConfiguration</string>
- <key>name</key>
- <string>Debug</string>
- </dict>
- </dict>
- <key>rootObject</key>
- <string>17CEED162E50412DA5FC1FA8</string>
-</dict>
-</plist>
View
4 Pods/PodsDummy_Pods.m
@@ -1,4 +0,0 @@
-@interface PodsDummy_Pods : NSObject
-@end
-@implementation PodsDummy_Pods
-@end
View
7 Pods/SVPullToRefresh/LICENSE.txt
@@ -1,7 +0,0 @@
-Copyright (C) 2012 Sam Vermette
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
View
113 Pods/SVPullToRefresh/README.textile
@@ -1,113 +0,0 @@
-__*Important note if your project doesn't use ARC*: you must add the @-fobjc-arc@ compiler flag to @SVPullToRefresh.m@ in Target Settings > Build Phases > Compile Sources.__
-
-h1. SVPullToRefresh
-
-SVPullToRefresh allows you to easily add pull-to-refresh and/or infinite scrolling functionalities to any @UITableView@ subclass with only 1 line of code. Instead of depending on delegates and/or subclassing @UIViewController@, SVPullToRefresh extends @UIScrollView@ with the following 2 methods:
-
-<pre>
-- (void)addPullToRefreshWithActionHandler:(void (^)(void))actionHandler;
-- (void)addInfiniteScrollingWithActionHandler:(void (^)(void))actionHandler;
-</pre>
-
-h2. Installation
-
-* Drag the @SVPullToRefresh/SVPullToRefresh@ folder into your project.
-* Add the *QuartzCore* framework to your project.
-* @#import "SVPullToRefresh.h"@
-
-h2. Usage
-
-(see sample Xcode project in @/Demo@)
-
-h3. Adding pull to refresh to your table view
-
-<pre>
-[tableView addPullToRefreshWithActionHandler:^{
- // refresh data
- // call [tableView.pullToRefreshView stopAnimating] when done
-}];
-</pre>
-
-If you’d like to programmatically trigger the refresh (for instance in viewDidLoad), you can do so with:
-
-<pre>
-[tableView.pullToRefreshView triggerRefresh];
-</pre>
-
-You can temporarily hide/disable pull to refresh by setting the @showsPullToRefresh@ property:
-
-<pre>
-tableView.showsPullToRefresh = NO;
-</pre>
-
-h4. Customization
-
-The @pullToRefreshView@ view can be customized using the following properties:
-
-<pre>
-@property (nonatomic, strong) UIColor *arrowColor;
-@property (nonatomic, strong) UIColor *textColor;
-@property (nonatomic, readwrite) UIActivityIndicatorViewStyle activityIndicatorViewStyle;
-</pre>
-
-You can access these properties through your scroll view's @pullToRefreshView@ property.
-
-For instance, you would set the @arrowColor@ property using:
-
-<pre>
-tableView.pullToRefreshView.arrowColor = [UIColor whiteColor];
-</pre>
-
-h4. Showing a "Last Updated" label
-
-If you think it's in the user's interest to display the date of the last refresh, you can set the @lastUpdatedDate@ property of @pullToRefreshView@:
-
-<pre>
-tableView.pullToRefreshView.lastUpdatedDate = nil; // will display "Last Updated: Never"
-tableView.pullToRefreshView.lastUpdatedDate = [NSDate date]; // will display "Last Updated: 4/30/12 11:53 AM"
-</pre>
-
-You can also configure how the date is displayed by setting the @dateFormatter@ property:
-
-<pre>
-NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
-dateFormatter.dateStyle = NSDateFormatterLongStyle;
-dateFormatter.timeStyle = NSDateFormatterNoStyle;
-tableView.pullToRefreshView.dateFormatter = dateFormatter;
-</pre>
-
-h3. Adding infinite scrolling to your table view
-
-<pre>
-[tableView addInfiniteScrollingWithActionHandler:^{
- // add data to data source, insert new cells into table view
-}];
-</pre>
-
-You can temporarily hide/disable infinite scrolling by setting the @showsInfiniteScrolling@ property:
-
-<pre>
-tableView.showsInfiniteScrolling = NO;
-</pre>
-
-h4. Customization
-
-The @infiniteScrollingView@ (a @UIView@ subclass) can be customized using the following properties:
-
-<pre>
-@property (nonatomic, readwrite) UIActivityIndicatorViewStyle activityIndicatorViewStyle;
-</pre>
-
-You can access these properties through your scroll view's @infiniteScrollingView@ property.
-
-h2. Under the hood
-
-SVPullToRefresh extends @UIScrollView@ by adding new public methods as well as a dynamic properties (thanks "@seb_morel":http://twitter.com/seb_morel!). It uses key-value observing to track the scrollView's @contentOffset@, which removes the need for the view to be linked to the @UIScrollViewDelegate@ protocol.
-
-h2. Credits
-
-SVPullToRefresh is brought to you by "Sam Vermette":http://samvermette.com and "contributors to the project":https://github.com/samvermette/SVPullToRefresh/contributors. If you have feature suggestions or bug reports, feel free to help out by sending pull requests or by "creating new issues":https://github.com/samvermette/SVPullToRefresh/issues/new. If you're using SVPullToRefresh in your project, attribution would be nice.
-
-Big thanks to "@seb_morel":http://twitter.com/seb_morel for his "Demistifying the Objective-C runtime":http://cocoaheadsmtl.s3.amazonaws.com/demistifying-runtime.pdf talk, which permitted the level of abstraction found in SVPullToRefresh.
-
-Hat tip to "Loren Brichter":http://twitter.com/lorenb for inventing such a great UI mechanism.
View
40 Pods/SVPullToRefresh/SVPullToRefresh/SVPullToRefresh.h
@@ -1,40 +0,0 @@
-//
-// SVPullToRefresh.h
-//
-// Created by Sam Vermette on 23.04.12.
-// Copyright (c) 2012 samvermette.com. All rights reserved.
-//
-// https://github.com/samvermette/SVPullToRefresh
-//
-
-#import <UIKit/UIKit.h>
-
-@interface SVPullToRefresh : UIView
-
-@property (nonatomic, strong) UIColor *arrowColor;
-@property (nonatomic, strong) UIColor *textColor;
-@property (nonatomic, readwrite) UIActivityIndicatorViewStyle activityIndicatorViewStyle;
-
-@property (nonatomic, strong) NSDate *lastUpdatedDate;
-@property (nonatomic, strong) NSDateFormatter *dateFormatter;
-
-- (void)triggerRefresh;
-- (void)stopAnimating;
-
-@end
-
-
-// extends UIScrollView
-
-@interface UIScrollView (SVPullToRefresh)
-
-- (void)addPullToRefreshWithActionHandler:(void (^)(void))actionHandler;
-- (void)addInfiniteScrollingWithActionHandler:(void (^)(void))actionHandler;
-
-@property (nonatomic, strong) SVPullToRefresh *pullToRefreshView;
-@property (nonatomic, strong) SVPullToRefresh *infiniteScrollingView;
-
-@property (nonatomic, assign) BOOL showsPullToRefresh;
-@property (nonatomic, assign) BOOL showsInfiniteScrolling;
-
-@end
View
507 Pods/SVPullToRefresh/SVPullToRefresh/SVPullToRefresh.m
@@ -1,507 +0,0 @@
-//
-// SVPullToRefresh.m
-//
-// Created by Sam Vermette on 23.04.12.
-// Copyright (c) 2012 samvermette.com. All rights reserved.
-//
-// https://github.com/samvermette/SVPullToRefresh
-//
-
-#import <QuartzCore/QuartzCore.h>
-#import "SVPullToRefresh.h"
-
-enum {
- SVPullToRefreshStateHidden = 1,
- SVPullToRefreshStateVisible,
- SVPullToRefreshStateTriggered,
- SVPullToRefreshStateLoading
-};
-
-typedef NSUInteger SVPullToRefreshState;
-
-@interface SVPullToRefreshArrow : UIView
-@property (nonatomic, strong) UIColor *arrowColor;
-@end
-
-
-@interface SVPullToRefresh ()
-
-- (id)initWithScrollView:(UIScrollView*)scrollView;
-- (void)rotateArrow:(float)degrees hide:(BOOL)hide;
-- (void)setScrollViewContentInset:(UIEdgeInsets)contentInset;
-- (void)scrollViewDidScroll:(CGPoint)contentOffset;
-
-- (void)startObservingScrollView;
-- (void)stopObservingScrollView;
-
-@property (nonatomic, copy) void (^pullToRefreshActionHandler)(void);
-@property (nonatomic, copy) void (^infiniteScrollingActionHandler)(void);
-@property (nonatomic, readwrite) SVPullToRefreshState state;
-
-@property (nonatomic, strong) SVPullToRefreshArrow *arrow;
-@property (nonatomic, strong) UIActivityIndicatorView *activityIndicatorView;
-@property (nonatomic, strong) UILabel *titleLabel;
-
-@property (nonatomic, strong, readonly) UILabel *dateLabel;
-
-@property (nonatomic, unsafe_unretained) UIScrollView *scrollView;
-@property (nonatomic, readwrite) UIEdgeInsets originalScrollViewContentInset;
-@property (nonatomic, strong) UIView *originalTableFooterView;
-
-@property (nonatomic, assign) BOOL showsPullToRefresh;
-@property (nonatomic, assign) BOOL showsInfiniteScrolling;
-@property (nonatomic, assign) BOOL isObservingScrollView;
-
-@end
-
-
-
-@implementation SVPullToRefresh
-
-// public properties
-@synthesize pullToRefreshActionHandler, infiniteScrollingActionHandler, arrowColor, textColor, activityIndicatorViewStyle, lastUpdatedDate, dateFormatter;
-
-@synthesize state;
-@synthesize scrollView = _scrollView;
-@synthesize arrow, activityIndicatorView, titleLabel, dateLabel, originalScrollViewContentInset, originalTableFooterView, showsPullToRefresh, showsInfiniteScrolling, isObservingScrollView;
-
-- (void)dealloc {
- [self stopObservingScrollView];
-}
-
-- (id)initWithScrollView:(UIScrollView *)scrollView {
- self = [super initWithFrame:CGRectZero];
- self.scrollView = scrollView;
-
- // default styling values
- self.activityIndicatorViewStyle = UIActivityIndicatorViewStyleGray;
- self.textColor = [UIColor darkGrayColor];
-
- self.originalScrollViewContentInset = self.scrollView.contentInset;
-
- return self;
-}
-
-- (void)willMoveToSuperview:(UIView *)newSuperview {
- if(newSuperview == self.scrollView)
- [self startObservingScrollView];
- else if(newSuperview == nil)
- [self stopObservingScrollView];
-}
-
-- (void)layoutSubviews {
- CGFloat remainingWidth = self.superview.bounds.size.width-200;
- float position = 0.50;
-
- CGRect titleFrame = titleLabel.frame;
- titleFrame.origin.x = ceil(remainingWidth*position+44);
- titleLabel.frame = titleFrame;
-
- CGRect dateFrame = dateLabel.frame;
- dateFrame.origin.x = titleFrame.origin.x;
- dateLabel.frame = dateFrame;
-
- CGRect arrowFrame = arrow.frame;
- arrowFrame.origin.x = ceil(remainingWidth*position);
- arrow.frame = arrowFrame;
-
- if(infiniteScrollingActionHandler) {
- self.activityIndicatorView.center = CGPointMake(round(self.bounds.size.width/2), round(self.bounds.size.height/2));
- } else
- self.activityIndicatorView.center = self.arrow.center;
-
-}
-
-#pragma mark - Getters
-
-- (SVPullToRefreshArrow *)arrow {
- if(!arrow && pullToRefreshActionHandler) {
- arrow = [SVPullToRefreshArrow new];
- arrow.frame = CGRectMake(0, 6, 22, 48);
- arrow.backgroundColor = [UIColor clearColor];
-
- // assign a different default color for arrow
-// arrow.arrowColor = [UIColor blueColor];
- }
- return arrow;
-}
-
-- (UIActivityIndicatorView *)activityIndicatorView {
- if(!activityIndicatorView) {
- activityIndicatorView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhite];
- activityIndicatorView.hidesWhenStopped = YES;
- [self addSubview:activityIndicatorView];
- }
- return activityIndicatorView;
-}
-
-- (UILabel *)dateLabel {
- if(!dateLabel && pullToRefreshActionHandler) {
- dateLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 28, 180, 20)];
- dateLabel.font = [UIFont systemFontOfSize:12];
- dateLabel.backgroundColor = [UIColor clearColor];
- dateLabel.textColor = textColor;
- [self addSubview:dateLabel];
-
- CGRect titleFrame = titleLabel.frame;
- titleFrame.origin.y = 12;
- titleLabel.frame = titleFrame;
- }
- return dateLabel;
-}
-
-- (NSDateFormatter *)dateFormatter {
- if(!dateFormatter) {
- dateFormatter = [[NSDateFormatter alloc] init];
- [dateFormatter setDateStyle:NSDateFormatterShortStyle];
- [dateFormatter setTimeStyle:NSDateFormatterShortStyle];
- dateFormatter.locale = [NSLocale currentLocale];
- }
- return dateFormatter;
-}
-
-- (UIEdgeInsets)originalScrollViewContentInset {
- return UIEdgeInsetsMake(originalScrollViewContentInset.top, self.scrollView.contentInset.left, self.scrollView.contentInset.bottom, self.scrollView.contentInset.right);
-}
-
-#pragma mark - Setters
-
-- (void)setPullToRefreshActionHandler:(void (^)(void))actionHandler {
- pullToRefreshActionHandler = [actionHandler copy];
- [_scrollView addSubview:self];
- self.showsPullToRefresh = YES;
-
- self.titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 20, 150, 20)];
- titleLabel.text = NSLocalizedString(@"Pull to refresh...",);
- titleLabel.font = [UIFont boldSystemFontOfSize:14];
- titleLabel.backgroundColor = [UIColor clearColor];
- titleLabel.textColor = textColor;
- [self addSubview:titleLabel];
-
- [self addSubview:self.arrow];
-
- self.state = SVPullToRefreshStateHidden;
- self.frame = CGRectMake(0, -60, self.scrollView.bounds.size.width, 60);
-}
-
-- (void)setInfiniteScrollingActionHandler:(void (^)(void))actionHandler {
- infiniteScrollingActionHandler = [actionHandler copy];
- self.showsInfiniteScrolling = YES;
-
- self.frame = CGRectMake(0, 0, self.scrollView.bounds.size.width, 60);
- self.originalTableFooterView = [(UITableView*)self.scrollView tableFooterView];
- [(UITableView*)self.scrollView setTableFooterView:self];
-
- self.state = SVPullToRefreshStateHidden;
- [self layoutSubviews];
-}
-
-- (void)setArrowColor:(UIColor *)newArrowColor {
- self.arrow.arrowColor = newArrowColor; // pass through
- [self.arrow setNeedsDisplay];
-}
-
-- (UIColor *)arrowColor {
- return self.arrow.arrowColor; // pass through
-}
-
-- (void)setTextColor:(UIColor *)newTextColor {
- textColor = newTextColor;
- titleLabel.textColor = newTextColor;
- dateLabel.textColor = newTextColor;
-}
-
-- (void)setActivityIndicatorViewStyle:(UIActivityIndicatorViewStyle)viewStyle {
- self.activityIndicatorView.activityIndicatorViewStyle = viewStyle;
-}
-
-- (void)setScrollViewContentInset:(UIEdgeInsets)contentInset {
- [UIView animateWithDuration:0.3 delay:0 options:UIViewAnimationOptionAllowUserInteraction|UIViewAnimationOptionBeginFromCurrentState animations:^{
- self.scrollView.contentInset = contentInset;
- } completion:^(BOOL finished) {
- if(self.state == SVPullToRefreshStateHidden && contentInset.top == self.originalScrollViewContentInset.top)
- [UIView animateWithDuration:0.2 delay:0 options:UIViewAnimationOptionAllowUserInteraction animations:^{
- arrow.alpha = 0;
- } completion:NULL];
- }];
-}
-
-- (void)setLastUpdatedDate:(NSDate *)newLastUpdatedDate {
- self.dateLabel.text = [NSString stringWithFormat:NSLocalizedString(@"Last Updated: %@",), newLastUpdatedDate?[self.dateFormatter stringFromDate:newLastUpdatedDate]:NSLocalizedString(@"Never",)];
-}
-
-- (void)setDateFormatter:(NSDateFormatter *)newDateFormatter {
- dateFormatter = newDateFormatter;
- self.dateLabel.text = [NSString stringWithFormat:NSLocalizedString(@"Last Updated: %@",), self.lastUpdatedDate?[newDateFormatter stringFromDate:self.lastUpdatedDate]:NSLocalizedString(@"Never",)];
-}
-
-- (void)setShowsInfiniteScrolling:(BOOL)show {
- showsInfiniteScrolling = show;
- if(!show)
- [(UITableView*)self.scrollView setTableFooterView:self.originalTableFooterView];
- else
- [(UITableView*)self.scrollView setTableFooterView:self];
-}
-
-#pragma mark -
-
-- (void)startObservingScrollView {
- if (self.isObservingScrollView)
- return;
-
- [self.scrollView addObserver:self forKeyPath:@"contentOffset" options:NSKeyValueObservingOptionNew context:nil];
- [self.scrollView addObserver:self forKeyPath:@"frame" options:NSKeyValueObservingOptionNew context:nil];
- self.isObservingScrollView = YES;
-}
-
-- (void)stopObservingScrollView {
- if(!self.isObservingScrollView)
- return;
-
- [self.scrollView removeObserver:self forKeyPath:@"contentOffset"];
- [self.scrollView removeObserver:self forKeyPath:@"frame"];
- self.isObservingScrollView = NO;
-}
-
-- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context {
- if([keyPath isEqualToString:@"contentOffset"])
- [self scrollViewDidScroll:[[change valueForKey:NSKeyValueChangeNewKey] CGPointValue]];
- else if([keyPath isEqualToString:@"frame"])
- [self layoutSubviews];
-}
-
-- (void)scrollViewDidScroll:(CGPoint)contentOffset {
- if(pullToRefreshActionHandler) {
- if (self.state == SVPullToRefreshStateLoading) {
- CGFloat offset = MAX(self.scrollView.contentOffset.y * -1, 0);
- offset = MIN(offset, 60.0f);
- self.scrollView.contentInset = UIEdgeInsetsMake(offset, 0.0f, 0.0f, 0.0f);
- } else {
- CGFloat scrollOffsetThreshold = self.frame.origin.y-self.originalScrollViewContentInset.top;
-
- if(!self.scrollView.isDragging && self.state == SVPullToRefreshStateTriggered)
- self.state = SVPullToRefreshStateLoading;
- else if(contentOffset.y > scrollOffsetThreshold && contentOffset.y < -self.originalScrollViewContentInset.top && self.scrollView.isDragging && self.state != SVPullToRefreshStateLoading)
- self.state = SVPullToRefreshStateVisible;
- else if(contentOffset.y < scrollOffsetThreshold && self.scrollView.isDragging && self.state == SVPullToRefreshStateVisible)
- self.state = SVPullToRefreshStateTriggered;
- else if(contentOffset.y >= -self.originalScrollViewContentInset.top && self.state != SVPullToRefreshStateHidden)
- self.state = SVPullToRefreshStateHidden;
- }
- }
- else if(infiniteScrollingActionHandler) {
- CGFloat scrollOffsetThreshold = self.scrollView.contentSize.height-self.scrollView.bounds.size.height-self.originalScrollViewContentInset.top;
-
- if(contentOffset.y > MAX(scrollOffsetThreshold, self.scrollView.bounds.size.height-self.scrollView.contentSize.height) && self.state == SVPullToRefreshStateHidden)
- self.state = SVPullToRefreshStateLoading;
- else if(contentOffset.y < scrollOffsetThreshold)
- self.state = SVPullToRefreshStateHidden;
- }
-}
-
-- (void)triggerRefresh {
- self.state = SVPullToRefreshStateLoading;
- [self.scrollView setContentOffset:CGPointMake(0, -60.0f) animated:YES];
-}
-
-- (void)stopAnimating {
- self.state = SVPullToRefreshStateHidden;
-}
-
-- (void)setState:(SVPullToRefreshState)newState {
-
- if(pullToRefreshActionHandler && !self.showsPullToRefresh && !self.activityIndicatorView.isAnimating) {
- titleLabel.text = NSLocalizedString(@"",);
- [self.activityIndicatorView stopAnimating];
- [self setScrollViewContentInset:self.originalScrollViewContentInset];
- [self rotateArrow:0 hide:YES];
- return;
- }
-
- if(infiniteScrollingActionHandler && !self.showsInfiniteScrolling)
- return;
-
- if(state == newState)
- return;
-
- state = newState;
-
- if(pullToRefreshActionHandler) {
- switch (newState) {
- case SVPullToRefreshStateHidden:
- titleLabel.text = NSLocalizedString(@"Pull to refresh...",);
- [self.activityIndicatorView stopAnimating];
- [self setScrollViewContentInset:self.originalScrollViewContentInset];
- [self rotateArrow:0 hide:NO];
- break;
-
- case SVPullToRefreshStateVisible:
- titleLabel.text = NSLocalizedString(@"Pull to refresh...",);
- arrow.alpha = 1;
- [self.activityIndicatorView stopAnimating];
- [self setScrollViewContentInset:self.originalScrollViewContentInset];
- [self rotateArrow:0 hide:NO];
- break;
-
- case SVPullToRefreshStateTriggered:
- titleLabel.text = NSLocalizedString(@"Release to refresh...",);
- [self rotateArrow:M_PI hide:NO];
- break;
-
- case SVPullToRefreshStateLoading:
- titleLabel.text = NSLocalizedString(@"Loading...",);
- [self.activityIndicatorView startAnimating];
- UIEdgeInsets newInsets = self.originalScrollViewContentInset;
- newInsets.top = self.frame.origin.y*-1+self.originalScrollViewContentInset.top;
- newInsets.bottom = self.scrollView.contentInset.bottom;
- [self setScrollViewContentInset:newInsets];
- [self rotateArrow:0 hide:YES];
- pullToRefreshActionHandler();
- break;
- }
- }
- else if(infiniteScrollingActionHandler) {
- switch (newState) {
- case SVPullToRefreshStateHidden:
- [self.activityIndicatorView stopAnimating];
- break;
-
- case SVPullToRefreshStateLoading:
- [self.activityIndicatorView startAnimating];
- infiniteScrollingActionHandler();
- break;
- }
- }
-}
-
-- (void)rotateArrow:(float)degrees hide:(BOOL)hide {
- [UIView animateWithDuration:0.2 delay:0 options:UIViewAnimationOptionAllowUserInteraction animations:^{
- self.arrow.layer.transform = CATransform3DMakeRotation(degrees, 0, 0, 1);
- self.arrow.layer.opacity = !hide;
- } completion:NULL];
-}
-
-@end
-
-
-#pragma mark - UIScrollView (SVPullToRefresh)
-#import <objc/runtime.h>
-
-static char UIScrollViewPullToRefreshView;
-static char UIScrollViewInfiniteScrollingView;
-
-@implementation UIScrollView (SVPullToRefresh)
-
-@dynamic pullToRefreshView, showsPullToRefresh, infiniteScrollingView, showsInfiniteScrolling;
-
-- (void)addPullToRefreshWithActionHandler:(void (^)(void))actionHandler {
- self.pullToRefreshView.pullToRefreshActionHandler = actionHandler;
-}
-
-- (void)addInfiniteScrollingWithActionHandler:(void (^)(void))actionHandler {
- self.infiniteScrollingView.infiniteScrollingActionHandler = actionHandler;
-}
-
-- (void)setPullToRefreshView:(SVPullToRefresh *)pullToRefreshView {
- [self willChangeValueForKey:@"pullToRefreshView"];
- objc_setAssociatedObject(self, &UIScrollViewPullToRefreshView,
- pullToRefreshView,
- OBJC_ASSOCIATION_ASSIGN);
- [self didChangeValueForKey:@"pullToRefreshView"];
-}
-
-- (void)setInfiniteScrollingView:(SVPullToRefresh *)pullToRefreshView {
- [self willChangeValueForKey:@"infiniteScrollingView"];
- objc_setAssociatedObject(self, &UIScrollViewInfiniteScrollingView,
- pullToRefreshView,
- OBJC_ASSOCIATION_RETAIN);
- [self didChangeValueForKey:@"infiniteScrollingView"];
-}
-
-- (SVPullToRefresh *)pullToRefreshView {
- SVPullToRefresh *pullToRefreshView = objc_getAssociatedObject(self, &UIScrollViewPullToRefreshView);
- if(!pullToRefreshView) {
- pullToRefreshView = [[SVPullToRefresh alloc] initWithScrollView:self];
- self.pullToRefreshView = pullToRefreshView;
- }
- return pullToRefreshView;
-}
-
-- (void)setShowsPullToRefresh:(BOOL)showsPullToRefresh {
- self.pullToRefreshView.showsPullToRefresh = showsPullToRefresh;
-}
-
-- (BOOL)showsPullToRefresh {
- return self.pullToRefreshView.showsPullToRefresh;
-}
-
-- (SVPullToRefresh *)infiniteScrollingView {
- SVPullToRefresh *infiniteScrollingView = objc_getAssociatedObject(self, &UIScrollViewInfiniteScrollingView);
- if(!infiniteScrollingView) {
- infiniteScrollingView = [[SVPullToRefresh alloc] initWithScrollView:self];
- self.infiniteScrollingView = infiniteScrollingView;
- }
- return infiniteScrollingView;
-}
-
-- (void)setShowsInfiniteScrolling:(BOOL)showsInfiniteScrolling {
- self.infiniteScrollingView.showsInfiniteScrolling = showsInfiniteScrolling;
-}
-
-- (BOOL)showsInfiniteScrolling {
- return self.infiniteScrollingView.showsInfiniteScrolling;
-}
-
-@end
-
-
-#pragma mark - SVPullToRefreshArrow
-
-@implementation SVPullToRefreshArrow
-@synthesize arrowColor;
-
-- (UIColor *)arrowColor {
- if (arrowColor) return arrowColor;
- return [UIColor grayColor]; // default Color
-}
-
-- (void)drawRect:(CGRect)rect {
- CGContextRef c = UIGraphicsGetCurrentContext();
-
- // the rects above the arrow
- CGContextAddRect(c, CGRectMake(5, 0, 12, 4)); // to-do: use dynamic points
- CGContextAddRect(c, CGRectMake(5, 6, 12, 4)); // currently fixed size: 22 x 48pt
- CGContextAddRect(c, CGRectMake(5, 12, 12, 4));
- CGContextAddRect(c, CGRectMake(5, 18, 12, 4));
- CGContextAddRect(c, CGRectMake(5, 24, 12, 4));
- CGContextAddRect(c, CGRectMake(5, 30, 12, 4));
-
- // the arrow
- CGContextMoveToPoint(c, 0, 34);
- CGContextAddLineToPoint(c, 11, 48);
- CGContextAddLineToPoint(c, 22, 34);
- CGContextAddLineToPoint(c, 0, 34);
- CGContextClosePath(c);
-
- CGContextSaveGState(c);
- CGContextClip(c);
-
-
- // Gradient Declaration
- CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
- NSArray* alphaGradientColors = [NSArray arrayWithObjects:
- (id)[self.arrowColor colorWithAlphaComponent:0].CGColor,
- (id)[self.arrowColor colorWithAlphaComponent:1].CGColor,
- nil];
- CGFloat alphaGradientLocations[] = {0, 0.8};
- CGGradientRef alphaGradient = CGGradientCreateWithColors(colorSpace, (__bridge CFArrayRef)alphaGradientColors, alphaGradientLocations);
-
-
- CGContextDrawLinearGradient(c, alphaGradient, CGPointZero, CGPointMake(0, rect.size.height), 0);
-
- CGContextRestoreGState(c);
-
- CGGradientRelease(alphaGradient);
- CGColorSpaceRelease(colorSpace);
-}
-@end

No commit comments for this range

Something went wrong with that request. Please try again.