├── .gitignore ├── .travis.yml ├── LICENSE ├── PullToRefreshControl ├── BEMPullToRefresh.h └── BEMPullToRefresh.m ├── README.md └── Sample Project ├── PullToRefresh.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcshareddata │ │ └── PullToRefresh.xccheckout │ └── xcuserdata │ │ └── bobo.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcuserdata │ └── bobo.xcuserdatad │ ├── xcdebugger │ ├── Breakpoints.xcbkptlist │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ ├── PullToRefresh.xcscheme │ └── xcschememanagement.plist └── PullToRefresh ├── AppDelegate.h ├── AppDelegate.m ├── Default-568h@2x.png ├── Default.png ├── Default@2x.png ├── PullToRefresh-Info.plist ├── PullToRefresh-Prefix.pch ├── TableViewController.h ├── TableViewController.m ├── en.lproj ├── InfoPlist.strings └── MainStoryboard.storyboard └── main.m /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .DS_Store? 3 | ._* 4 | .Spotlight-V100 5 | .Trashes 6 | Icon? 7 | ehthumbs.db 8 | Thumbs.db -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: objective-c 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Boris Emorine 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /PullToRefreshControl/BEMPullToRefresh.h: -------------------------------------------------------------------------------- 1 | // 2 | // BEMPullToRefresh.h 3 | // PullToRefresh 4 | // 5 | // Created by Bobo on 1/12/14. 6 | // Copyright (c) 2014 Bobo. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @protocol BEMPullToRefreshDelegate 12 | 13 | @required 14 | 15 | /// Initilalize the refreshing process in this method. For example, call the JSON API to get the updated data. Once done, call isDoneRefreshing (see below) to stop the animation. 16 | - (void)Refresh; 17 | 18 | @end 19 | 20 | @interface BEMPullToRefresh : UIView 21 | 22 | 23 | 24 | //------------------------------------------------------------------------------------// 25 | //----- DELEGATE ---------------------------------------------------------------------// 26 | //------------------------------------------------------------------------------------// 27 | 28 | 29 | /// The delegate for BEMPullToRefresh. 30 | @property (nonatomic, weak) id delegate; 31 | 32 | 33 | 34 | //------------------------------------------------------------------------------------// 35 | //----- METHODS ----------------------------------------------------------------------// 36 | //------------------------------------------------------------------------------------// 37 | 38 | 39 | /// Initialize the graph with a number of dots. 40 | - (id)initWithNumberOfDots:(int)numberOfDots; 41 | 42 | 43 | /// Informs the delegate that the scrollView has been pulled by the user. This method should be called in – scrollViewDidScroll: 44 | - (void)viewDidScroll:(UIScrollView *)scrollView; 45 | 46 | 47 | /// Call this method when the data has been updated. The animation will stop after its current cycle. 48 | - (void)isDoneRefreshing; 49 | 50 | 51 | 52 | //------------------------------------------------------------------------------------// 53 | //----- PROPERTIES -------------------------------------------------------------------// 54 | //------------------------------------------------------------------------------------// 55 | 56 | 57 | /// The color of the dots. The default is lightGray. 58 | @property (strong, nonatomic) UIColor *dotColor; 59 | 60 | 61 | /// The threshold to detect if the refresh process should be triggered. A value close to 0 means that the user needs to bearly pull the tableView to trigger the refreshing process. A value superior at 100 makes it really hard to trigger. The default value is 100. 62 | @property (nonatomic) float thresholdToTrigger; 63 | 64 | /// The speed of the dots during the animation. Default value is 1, a value between 0 and 1 will speed up the animation while a value superior to 1 will slow it down. 65 | @property (nonatomic) float animationSpeed; 66 | 67 | @end 68 | -------------------------------------------------------------------------------- /PullToRefreshControl/BEMPullToRefresh.m: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // BEMPullToRefresh.m 4 | // PullToRefresh 5 | // 6 | // Created by Bobo on 1/12/14. 7 | // Copyright (c) 2014 Bobo. All rights reserved. 8 | // 9 | 10 | #import "BEMPullToRefresh.h" 11 | 12 | @interface BEMPullToRefresh () 13 | { 14 | // / The width of the screen. Updated according to the orientation. 15 | float screenWidth; 16 | 17 | // / The height of the screen. Updated according to the orientation. 18 | float screenHeight; 19 | 20 | // / BOOL used at the end of the animation to see if the new data has been displayed or not. If the new data is not here, the animation will continue. 21 | BOOL isRefreshing; 22 | } 23 | 24 | @end 25 | 26 | @implementation BEMPullToRefresh 27 | 28 | - (id)initWithFrame:(CGRect)frame 29 | { 30 | return [self initWithNumberOfDots:5]; 31 | } 32 | 33 | - (id)initWithNumberOfDots:(int)numberOfDots 34 | { 35 | self = [super initWithFrame:CGRectMake(0, 0, 0, 0)]; 36 | if (self) { 37 | // Initialization code 38 | 39 | // Default values. 40 | isRefreshing = NO; 41 | _thresholdToTrigger = 100; 42 | _dotColor = [UIColor lightGrayColor]; 43 | _animationSpeed = 1; 44 | 45 | 46 | if (numberOfDots <= 0) { 47 | NSLog(@"ERROR - numberOfDots should be at least 1."); 48 | } 49 | 50 | else { 51 | 52 | self.backgroundColor = [UIColor blackColor]; 53 | 54 | for (int i = 0; i < numberOfDots; i++) { 55 | UIView *dot = [[UIView alloc] initWithFrame:CGRectMake(-3, 0, 3, 3)]; 56 | dot.tag = i+1; 57 | dot.hidden = YES; 58 | [self addSubview: dot]; 59 | } 60 | } 61 | } 62 | return (self); 63 | } 64 | 65 | - (void)viewDidScroll:(UIScrollView *)scrollView { 66 | 67 | self.frame = CGRectMake(0, scrollView.contentOffset.y, [[UIScreen mainScreen]bounds].size.height, scrollView.contentOffset.y * (-1)); 68 | 69 | if (([[UIApplication sharedApplication] statusBarOrientation] == 0) || ([[UIApplication sharedApplication] statusBarOrientation] == 1)) 70 | { 71 | screenWidth = self.superview.frame.size.width; 72 | screenHeight = self.superview.frame.size.height; 73 | 74 | if (scrollView.contentOffset.y < (-self.thresholdToTrigger) && scrollView.isTracking == NO && isRefreshing == NO) { 75 | [self triggeredRefresh:scrollView]; 76 | 77 | [self.delegate Refresh]; 78 | 79 | } 80 | } 81 | 82 | else if (([UIDevice currentDevice].orientation == 3) || ([UIDevice currentDevice].orientation == 4)) 83 | { 84 | screenWidth = self.superview.frame.size.height; 85 | screenHeight = self.superview.frame.size.width; 86 | 87 | if (scrollView.contentOffset.y < (-self.thresholdToTrigger - 20) && scrollView.isTracking == NO && isRefreshing == NO) {//In landscape mode, the threshold to trigger the refresh should be a little bit lower. 88 | [self triggeredRefresh:scrollView]; 89 | 90 | [self.delegate Refresh]; 91 | 92 | } 93 | } 94 | } 95 | 96 | - (void)triggeredRefresh:(UIScrollView *)scrollView { 97 | 98 | isRefreshing = YES; 99 | 100 | [UIView beginAnimations:nil context:NULL]; 101 | [UIView setAnimationDuration:0.2]; 102 | scrollView.contentInset = UIEdgeInsetsMake(10, 0.0f, 0.0f, 0.0f); 103 | [UIView commitAnimations]; 104 | 105 | 106 | for (int i = 0; i < self.subviews.count; i++) { 107 | 108 | for (UIView *dot in self.subviews) { 109 | 110 | dot.hidden = NO; 111 | dot.backgroundColor = self.dotColor; 112 | 113 | if (dot.tag == i + 1) { 114 | [UIView animateWithDuration:(0.3f * self.animationSpeed) delay:(i * 0.2 * self.animationSpeed) options:UIViewAnimationOptionCurveLinear animations:^{ 115 | dot.frame = CGRectMake(screenWidth/4, 0, 3, 3); 116 | } completion:^(BOOL finished){ 117 | [UIView animateWithDuration:(1.9f* self.animationSpeed) delay:0 options:UIViewAnimationOptionCurveLinear animations:^{ 118 | dot.frame = CGRectMake(screenWidth/1.333, 0, 3, 3); 119 | } completion:^(BOOL finished){ 120 | [UIView animateWithDuration:(0.3f* self.animationSpeed) delay:0 options:UIViewAnimationOptionCurveLinear animations:^{ 121 | dot.frame = CGRectMake(screenWidth, 0, 3, 3); 122 | } completion:^(BOOL finished){ 123 | dot.frame = CGRectMake(-3, 0, 3, 3); 124 | dot.hidden = YES; 125 | 126 | if (dot.tag == self.subviews.count) { 127 | 128 | if(isRefreshing == YES) { // Still refreshing. 129 | 130 | if (([[UIApplication sharedApplication] statusBarOrientation] == 0) || ([[UIApplication sharedApplication] statusBarOrientation] == 1)) 131 | { 132 | screenWidth = self.superview.frame.size.width; 133 | screenHeight = self.superview.frame.size.height; 134 | } 135 | 136 | if (([UIDevice currentDevice].orientation == 3) || ([UIDevice currentDevice].orientation == 4)) 137 | { 138 | screenWidth = self.superview.frame.size.height; 139 | screenHeight = self.superview.frame.size.width; 140 | } 141 | 142 | [self triggeredRefresh:scrollView]; 143 | } 144 | 145 | else { // Done refreshing 146 | isRefreshing = NO; 147 | [UIView beginAnimations:nil context:NULL]; 148 | [UIView setAnimationDuration:0.2]; 149 | scrollView.contentInset = UIEdgeInsetsMake(0.0f, 0.0f, 0.0f, 0.0f); 150 | [UIView commitAnimations]; 151 | } 152 | } 153 | }]; 154 | }]; 155 | }]; 156 | } 157 | } 158 | } 159 | } 160 | 161 | - (void)isDoneRefreshing{ 162 | isRefreshing = NO; 163 | } 164 | 165 | @end 166 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # BEMPullToRefreshWP8 2 | 3 | [![Build Status](https://travis-ci.org/Boris-Em/BEMPullToRefreshWP8.svg?branch=master)](https://travis-ci.org/Boris-Em/BEMPullToRefreshWP8) 4 | 5 |

Simple Pull to Refresh Control for iOS. Inspired by WP8.

6 | 7 | ### Requirements 8 | - Requires iOS 6 or later. The sample project is optimized for iOS 7. 9 | - Requires Automatic Reference Counting (ARC). 10 | 11 | ### License 12 | See the [License](https://github.com/Boris-Em/BEMPullToRefreshWP8/blob/master/LICENSE). You are free to make changes and use this in either personal or commercial projects. Attribution is not required, but it appreciated. A little Thanks! (or something to that affect) would be much appreciated. If you use BEMSimpleLineGraph in your app, let us know. 13 | Please note that Microsoft might not be really happy if you use this control as it looks exactly like what is used on Windows Phone. 14 | 15 | ### Contributions 16 | Any contribution is more than welcome! You can contribute through pull requests and issues on GitHub. 17 | 18 | ### Sample App 19 | The iOS Sample App included with this project demonstrates how to correctly setup and use BEMPullToRefreshWP8. You can refer to the sample app for an understanding of how to use and setup BEMPullToRefreshWP8. 20 | 21 | ### Installation 22 | To install BEMPullToRefreshWP8 simply drag and drop the *PullToRefreshControl* folder into your Xcode project. When you do so, check the "*Copy items into destination group's folder*" box. 23 | 24 | ### Setup 25 | To setup BEMPullToRefreshWP8, follow the steps below. 26 | 27 | 1. Import `"BEMPullToRefresh.h"` to the header of your TableViewController: 28 | 29 | #import "BEMPullToRefresh.h" 30 | 31 | 2. Implement the `BEMPullToRefreshDelegate` to the same TableViewController: 32 | 33 | @interface YourViewController : UITableViewController 34 | 35 | 3. Add the following code to your implementation (usually the `viewDidLoad` method). 36 | 37 | BEMPullToRefresh *myPTR = [[BEMPullToRefresh alloc] initWithNumberOfDots:5]; 38 | myPTR.delegate = self; 39 | [self.view addSubview:myPTR]; 40 | 41 | 4. Call the method `viewDidScroll:` in `scrollViewDidScroll:`to inform the control when the view is scrolled by the user. 42 | 43 | - (void)scrollViewDidScroll:(UIScrollView *)scrollView { 44 | [self.myPTR viewDidScroll:scrollView]; 45 | } 46 | 47 | 5. Implement the requiered method `Refresh` 48 | 49 | - (void)Refresh { 50 | // Perform here the required actions to refresh the data (call a JSON API for example). 51 | // Once the data has been updated, call the method isDoneRefreshing: 52 | [self.myPTR isDoneRefreshing]; 53 | } 54 | 55 | ### Properties 56 | 57 | The `dotColor` property controls the color of the dots. 58 | 59 | The `thresholdToTrigger` property controls how far the user needs to pull down the tableview for the refresh to be triggered. A value close to 0 will make it really easy to be triggered while a value above 100 will make it really hard. 60 | 61 | The `animationSpeed` property controls the speed of the dots during the animation. The default value is 1. A value between 0 and 1 will speed up the animation while a value superior to 1 will slow it down. 62 | -------------------------------------------------------------------------------- /Sample Project/PullToRefresh.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | C3210F8B175F153200D48506 /* TableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C3210F8A175F153200D48506 /* TableViewController.m */; }; 11 | C362BB84175E606E00C93E33 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C362BB83175E606E00C93E33 /* UIKit.framework */; }; 12 | C362BB86175E606E00C93E33 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C362BB85175E606E00C93E33 /* Foundation.framework */; }; 13 | C362BB88175E606E00C93E33 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C362BB87175E606E00C93E33 /* CoreGraphics.framework */; }; 14 | C362BB8E175E606E00C93E33 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = C362BB8C175E606E00C93E33 /* InfoPlist.strings */; }; 15 | C362BB90175E606E00C93E33 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = C362BB8F175E606E00C93E33 /* main.m */; }; 16 | C362BB94175E606E00C93E33 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = C362BB93175E606E00C93E33 /* AppDelegate.m */; }; 17 | C362BB96175E606E00C93E33 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = C362BB95175E606E00C93E33 /* Default.png */; }; 18 | C362BB98175E606E00C93E33 /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = C362BB97175E606E00C93E33 /* Default@2x.png */; }; 19 | C362BB9A175E606E00C93E33 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = C362BB99175E606E00C93E33 /* Default-568h@2x.png */; }; 20 | C362BB9D175E606E00C93E33 /* MainStoryboard.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C362BB9B175E606E00C93E33 /* MainStoryboard.storyboard */; }; 21 | C3BFAA0418836AD4006BE190 /* BEMPullToRefresh.m in Sources */ = {isa = PBXBuildFile; fileRef = C3BFAA0318836AD4006BE190 /* BEMPullToRefresh.m */; }; 22 | /* End PBXBuildFile section */ 23 | 24 | /* Begin PBXFileReference section */ 25 | C3210F89175F153200D48506 /* TableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TableViewController.h; sourceTree = ""; }; 26 | C3210F8A175F153200D48506 /* TableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TableViewController.m; sourceTree = ""; }; 27 | C362BB80175E606E00C93E33 /* PullToRefresh.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PullToRefresh.app; sourceTree = BUILT_PRODUCTS_DIR; }; 28 | C362BB83175E606E00C93E33 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 29 | C362BB85175E606E00C93E33 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 30 | C362BB87175E606E00C93E33 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 31 | C362BB8B175E606E00C93E33 /* PullToRefresh-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "PullToRefresh-Info.plist"; sourceTree = ""; }; 32 | C362BB8D175E606E00C93E33 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 33 | C362BB8F175E606E00C93E33 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 34 | C362BB91175E606E00C93E33 /* PullToRefresh-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PullToRefresh-Prefix.pch"; sourceTree = ""; }; 35 | C362BB92175E606E00C93E33 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 36 | C362BB93175E606E00C93E33 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 37 | C362BB95175E606E00C93E33 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = ""; }; 38 | C362BB97175E606E00C93E33 /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x.png"; sourceTree = ""; }; 39 | C362BB99175E606E00C93E33 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; 40 | C362BB9C175E606E00C93E33 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = en; path = en.lproj/MainStoryboard.storyboard; sourceTree = ""; }; 41 | C3BFAA0218836AD4006BE190 /* BEMPullToRefresh.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BEMPullToRefresh.h; path = ../../PullToRefreshControl/BEMPullToRefresh.h; sourceTree = ""; }; 42 | C3BFAA0318836AD4006BE190 /* BEMPullToRefresh.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = BEMPullToRefresh.m; path = ../../PullToRefreshControl/BEMPullToRefresh.m; sourceTree = ""; }; 43 | /* End PBXFileReference section */ 44 | 45 | /* Begin PBXFrameworksBuildPhase section */ 46 | C362BB7D175E606E00C93E33 /* Frameworks */ = { 47 | isa = PBXFrameworksBuildPhase; 48 | buildActionMask = 2147483647; 49 | files = ( 50 | C362BB84175E606E00C93E33 /* UIKit.framework in Frameworks */, 51 | C362BB86175E606E00C93E33 /* Foundation.framework in Frameworks */, 52 | C362BB88175E606E00C93E33 /* CoreGraphics.framework in Frameworks */, 53 | ); 54 | runOnlyForDeploymentPostprocessing = 0; 55 | }; 56 | /* End PBXFrameworksBuildPhase section */ 57 | 58 | /* Begin PBXGroup section */ 59 | C362BB77175E606E00C93E33 = { 60 | isa = PBXGroup; 61 | children = ( 62 | C362BB89175E606E00C93E33 /* PullToRefresh */, 63 | C362BB82175E606E00C93E33 /* Frameworks */, 64 | C362BB81175E606E00C93E33 /* Products */, 65 | ); 66 | sourceTree = ""; 67 | }; 68 | C362BB81175E606E00C93E33 /* Products */ = { 69 | isa = PBXGroup; 70 | children = ( 71 | C362BB80175E606E00C93E33 /* PullToRefresh.app */, 72 | ); 73 | name = Products; 74 | sourceTree = ""; 75 | }; 76 | C362BB82175E606E00C93E33 /* Frameworks */ = { 77 | isa = PBXGroup; 78 | children = ( 79 | C362BB83175E606E00C93E33 /* UIKit.framework */, 80 | C362BB85175E606E00C93E33 /* Foundation.framework */, 81 | C362BB87175E606E00C93E33 /* CoreGraphics.framework */, 82 | ); 83 | name = Frameworks; 84 | sourceTree = ""; 85 | }; 86 | C362BB89175E606E00C93E33 /* PullToRefresh */ = { 87 | isa = PBXGroup; 88 | children = ( 89 | C362BB92175E606E00C93E33 /* AppDelegate.h */, 90 | C362BB93175E606E00C93E33 /* AppDelegate.m */, 91 | C362BB9B175E606E00C93E33 /* MainStoryboard.storyboard */, 92 | C3210F89175F153200D48506 /* TableViewController.h */, 93 | C3210F8A175F153200D48506 /* TableViewController.m */, 94 | C3BFAA0218836AD4006BE190 /* BEMPullToRefresh.h */, 95 | C3BFAA0318836AD4006BE190 /* BEMPullToRefresh.m */, 96 | C362BB8A175E606E00C93E33 /* Supporting Files */, 97 | ); 98 | path = PullToRefresh; 99 | sourceTree = ""; 100 | }; 101 | C362BB8A175E606E00C93E33 /* Supporting Files */ = { 102 | isa = PBXGroup; 103 | children = ( 104 | C362BB8B175E606E00C93E33 /* PullToRefresh-Info.plist */, 105 | C362BB8C175E606E00C93E33 /* InfoPlist.strings */, 106 | C362BB8F175E606E00C93E33 /* main.m */, 107 | C362BB91175E606E00C93E33 /* PullToRefresh-Prefix.pch */, 108 | C362BB95175E606E00C93E33 /* Default.png */, 109 | C362BB97175E606E00C93E33 /* Default@2x.png */, 110 | C362BB99175E606E00C93E33 /* Default-568h@2x.png */, 111 | ); 112 | name = "Supporting Files"; 113 | sourceTree = ""; 114 | }; 115 | /* End PBXGroup section */ 116 | 117 | /* Begin PBXNativeTarget section */ 118 | C362BB7F175E606E00C93E33 /* PullToRefresh */ = { 119 | isa = PBXNativeTarget; 120 | buildConfigurationList = C362BBA3175E606E00C93E33 /* Build configuration list for PBXNativeTarget "PullToRefresh" */; 121 | buildPhases = ( 122 | C362BB7C175E606E00C93E33 /* Sources */, 123 | C362BB7D175E606E00C93E33 /* Frameworks */, 124 | C362BB7E175E606E00C93E33 /* Resources */, 125 | ); 126 | buildRules = ( 127 | ); 128 | dependencies = ( 129 | ); 130 | name = PullToRefresh; 131 | productName = PullToRefresh; 132 | productReference = C362BB80175E606E00C93E33 /* PullToRefresh.app */; 133 | productType = "com.apple.product-type.application"; 134 | }; 135 | /* End PBXNativeTarget section */ 136 | 137 | /* Begin PBXProject section */ 138 | C362BB78175E606E00C93E33 /* Project object */ = { 139 | isa = PBXProject; 140 | attributes = { 141 | LastUpgradeCheck = 0460; 142 | ORGANIZATIONNAME = Bobo; 143 | }; 144 | buildConfigurationList = C362BB7B175E606E00C93E33 /* Build configuration list for PBXProject "PullToRefresh" */; 145 | compatibilityVersion = "Xcode 3.2"; 146 | developmentRegion = English; 147 | hasScannedForEncodings = 0; 148 | knownRegions = ( 149 | en, 150 | ); 151 | mainGroup = C362BB77175E606E00C93E33; 152 | productRefGroup = C362BB81175E606E00C93E33 /* Products */; 153 | projectDirPath = ""; 154 | projectRoot = ""; 155 | targets = ( 156 | C362BB7F175E606E00C93E33 /* PullToRefresh */, 157 | ); 158 | }; 159 | /* End PBXProject section */ 160 | 161 | /* Begin PBXResourcesBuildPhase section */ 162 | C362BB7E175E606E00C93E33 /* Resources */ = { 163 | isa = PBXResourcesBuildPhase; 164 | buildActionMask = 2147483647; 165 | files = ( 166 | C362BB8E175E606E00C93E33 /* InfoPlist.strings in Resources */, 167 | C362BB96175E606E00C93E33 /* Default.png in Resources */, 168 | C362BB98175E606E00C93E33 /* Default@2x.png in Resources */, 169 | C362BB9A175E606E00C93E33 /* Default-568h@2x.png in Resources */, 170 | C362BB9D175E606E00C93E33 /* MainStoryboard.storyboard in Resources */, 171 | ); 172 | runOnlyForDeploymentPostprocessing = 0; 173 | }; 174 | /* End PBXResourcesBuildPhase section */ 175 | 176 | /* Begin PBXSourcesBuildPhase section */ 177 | C362BB7C175E606E00C93E33 /* Sources */ = { 178 | isa = PBXSourcesBuildPhase; 179 | buildActionMask = 2147483647; 180 | files = ( 181 | C3BFAA0418836AD4006BE190 /* BEMPullToRefresh.m in Sources */, 182 | C362BB90175E606E00C93E33 /* main.m in Sources */, 183 | C362BB94175E606E00C93E33 /* AppDelegate.m in Sources */, 184 | C3210F8B175F153200D48506 /* TableViewController.m in Sources */, 185 | ); 186 | runOnlyForDeploymentPostprocessing = 0; 187 | }; 188 | /* End PBXSourcesBuildPhase section */ 189 | 190 | /* Begin PBXVariantGroup section */ 191 | C362BB8C175E606E00C93E33 /* InfoPlist.strings */ = { 192 | isa = PBXVariantGroup; 193 | children = ( 194 | C362BB8D175E606E00C93E33 /* en */, 195 | ); 196 | name = InfoPlist.strings; 197 | sourceTree = ""; 198 | }; 199 | C362BB9B175E606E00C93E33 /* MainStoryboard.storyboard */ = { 200 | isa = PBXVariantGroup; 201 | children = ( 202 | C362BB9C175E606E00C93E33 /* en */, 203 | ); 204 | name = MainStoryboard.storyboard; 205 | sourceTree = ""; 206 | }; 207 | /* End PBXVariantGroup section */ 208 | 209 | /* Begin XCBuildConfiguration section */ 210 | C362BBA1175E606E00C93E33 /* Debug */ = { 211 | isa = XCBuildConfiguration; 212 | buildSettings = { 213 | ALWAYS_SEARCH_USER_PATHS = NO; 214 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 215 | CLANG_CXX_LIBRARY = "libc++"; 216 | CLANG_ENABLE_OBJC_ARC = YES; 217 | CLANG_WARN_CONSTANT_CONVERSION = YES; 218 | CLANG_WARN_EMPTY_BODY = YES; 219 | CLANG_WARN_ENUM_CONVERSION = YES; 220 | CLANG_WARN_INT_CONVERSION = YES; 221 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 222 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 223 | COPY_PHASE_STRIP = NO; 224 | GCC_C_LANGUAGE_STANDARD = gnu99; 225 | GCC_DYNAMIC_NO_PIC = NO; 226 | GCC_OPTIMIZATION_LEVEL = 0; 227 | GCC_PREPROCESSOR_DEFINITIONS = ( 228 | "DEBUG=1", 229 | "$(inherited)", 230 | ); 231 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 232 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 233 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 234 | GCC_WARN_UNUSED_VARIABLE = YES; 235 | IPHONEOS_DEPLOYMENT_TARGET = 6.0; 236 | ONLY_ACTIVE_ARCH = YES; 237 | SDKROOT = iphoneos; 238 | }; 239 | name = Debug; 240 | }; 241 | C362BBA2175E606E00C93E33 /* Release */ = { 242 | isa = XCBuildConfiguration; 243 | buildSettings = { 244 | ALWAYS_SEARCH_USER_PATHS = NO; 245 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 246 | CLANG_CXX_LIBRARY = "libc++"; 247 | CLANG_ENABLE_OBJC_ARC = YES; 248 | CLANG_WARN_CONSTANT_CONVERSION = YES; 249 | CLANG_WARN_EMPTY_BODY = YES; 250 | CLANG_WARN_ENUM_CONVERSION = YES; 251 | CLANG_WARN_INT_CONVERSION = YES; 252 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 253 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 254 | COPY_PHASE_STRIP = YES; 255 | GCC_C_LANGUAGE_STANDARD = gnu99; 256 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 257 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 258 | GCC_WARN_UNUSED_VARIABLE = YES; 259 | IPHONEOS_DEPLOYMENT_TARGET = 6.0; 260 | OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; 261 | SDKROOT = iphoneos; 262 | VALIDATE_PRODUCT = YES; 263 | }; 264 | name = Release; 265 | }; 266 | C362BBA4175E606E00C93E33 /* Debug */ = { 267 | isa = XCBuildConfiguration; 268 | buildSettings = { 269 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 270 | GCC_PREFIX_HEADER = "PullToRefresh/PullToRefresh-Prefix.pch"; 271 | INFOPLIST_FILE = "PullToRefresh/PullToRefresh-Info.plist"; 272 | PRODUCT_NAME = "$(TARGET_NAME)"; 273 | WRAPPER_EXTENSION = app; 274 | }; 275 | name = Debug; 276 | }; 277 | C362BBA5175E606E00C93E33 /* Release */ = { 278 | isa = XCBuildConfiguration; 279 | buildSettings = { 280 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 281 | GCC_PREFIX_HEADER = "PullToRefresh/PullToRefresh-Prefix.pch"; 282 | INFOPLIST_FILE = "PullToRefresh/PullToRefresh-Info.plist"; 283 | PRODUCT_NAME = "$(TARGET_NAME)"; 284 | WRAPPER_EXTENSION = app; 285 | }; 286 | name = Release; 287 | }; 288 | /* End XCBuildConfiguration section */ 289 | 290 | /* Begin XCConfigurationList section */ 291 | C362BB7B175E606E00C93E33 /* Build configuration list for PBXProject "PullToRefresh" */ = { 292 | isa = XCConfigurationList; 293 | buildConfigurations = ( 294 | C362BBA1175E606E00C93E33 /* Debug */, 295 | C362BBA2175E606E00C93E33 /* Release */, 296 | ); 297 | defaultConfigurationIsVisible = 0; 298 | defaultConfigurationName = Release; 299 | }; 300 | C362BBA3175E606E00C93E33 /* Build configuration list for PBXNativeTarget "PullToRefresh" */ = { 301 | isa = XCConfigurationList; 302 | buildConfigurations = ( 303 | C362BBA4175E606E00C93E33 /* Debug */, 304 | C362BBA5175E606E00C93E33 /* Release */, 305 | ); 306 | defaultConfigurationIsVisible = 0; 307 | defaultConfigurationName = Release; 308 | }; 309 | /* End XCConfigurationList section */ 310 | }; 311 | rootObject = C362BB78175E606E00C93E33 /* Project object */; 312 | } 313 | -------------------------------------------------------------------------------- /Sample Project/PullToRefresh.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Sample Project/PullToRefresh.xcodeproj/project.xcworkspace/xcshareddata/PullToRefresh.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | 3E786B72-5543-41A4-AA8C-81EE91C503BC 9 | IDESourceControlProjectName 10 | PullToRefresh 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | AB6F2AF4-5B87-44C4-A86C-BF59F2D5DA1C 14 | https://github.com/Boris-Em/BEMPullToRefreshWP8.git 15 | 16 | IDESourceControlProjectPath 17 | Sample Project/PullToRefresh.xcodeproj/project.xcworkspace 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | AB6F2AF4-5B87-44C4-A86C-BF59F2D5DA1C 21 | ../../.. 22 | 23 | IDESourceControlProjectURL 24 | https://github.com/Boris-Em/BEMPullToRefreshWP8.git 25 | IDESourceControlProjectVersion 26 | 110 27 | IDESourceControlProjectWCCIdentifier 28 | AB6F2AF4-5B87-44C4-A86C-BF59F2D5DA1C 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | AB6F2AF4-5B87-44C4-A86C-BF59F2D5DA1C 36 | IDESourceControlWCCName 37 | BEMPullToRefreshWP8 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /Sample Project/PullToRefresh.xcodeproj/project.xcworkspace/xcuserdata/bobo.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Boris-Em/BEMPullToRefreshWP8/1c5fedb9ebfc4609b26de20a0e62a72aa7ca4811/Sample Project/PullToRefresh.xcodeproj/project.xcworkspace/xcuserdata/bobo.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /Sample Project/PullToRefresh.xcodeproj/xcuserdata/bobo.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /Sample Project/PullToRefresh.xcodeproj/xcuserdata/bobo.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /Sample Project/PullToRefresh.xcodeproj/xcuserdata/bobo.xcuserdatad/xcschemes/PullToRefresh.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 51 | 52 | 58 | 59 | 60 | 61 | 62 | 63 | 69 | 70 | 76 | 77 | 78 | 79 | 81 | 82 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /Sample Project/PullToRefresh.xcodeproj/xcuserdata/bobo.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | PullToRefresh.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | C362BB7F175E606E00C93E33 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /Sample Project/PullToRefresh/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // PullToRefresh 4 | // 5 | // Created by Bobo on 6/4/13. 6 | // Copyright (c) 2013 Bobo. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Sample Project/PullToRefresh/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // PullToRefresh 4 | // 5 | // Created by Bobo on 6/4/13. 6 | // Copyright (c) 2013 Bobo. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @implementation AppDelegate 12 | 13 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 14 | { 15 | // Override point for customization after application launch. 16 | return YES; 17 | } 18 | 19 | - (void)applicationWillResignActive:(UIApplication *)application 20 | { 21 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 22 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 23 | } 24 | 25 | - (void)applicationDidEnterBackground:(UIApplication *)application 26 | { 27 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 28 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 29 | } 30 | 31 | - (void)applicationWillEnterForeground:(UIApplication *)application 32 | { 33 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | - (void)applicationDidBecomeActive:(UIApplication *)application 37 | { 38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 39 | } 40 | 41 | - (void)applicationWillTerminate:(UIApplication *)application 42 | { 43 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /Sample Project/PullToRefresh/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Boris-Em/BEMPullToRefreshWP8/1c5fedb9ebfc4609b26de20a0e62a72aa7ca4811/Sample Project/PullToRefresh/Default-568h@2x.png -------------------------------------------------------------------------------- /Sample Project/PullToRefresh/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Boris-Em/BEMPullToRefreshWP8/1c5fedb9ebfc4609b26de20a0e62a72aa7ca4811/Sample Project/PullToRefresh/Default.png -------------------------------------------------------------------------------- /Sample Project/PullToRefresh/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Boris-Em/BEMPullToRefreshWP8/1c5fedb9ebfc4609b26de20a0e62a72aa7ca4811/Sample Project/PullToRefresh/Default@2x.png -------------------------------------------------------------------------------- /Sample Project/PullToRefresh/PullToRefresh-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | test.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UIMainStoryboardFile 28 | MainStoryboard 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UIStatusBarHidden 34 | 35 | UISupportedInterfaceOrientations 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationLandscapeLeft 39 | UIInterfaceOrientationLandscapeRight 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /Sample Project/PullToRefresh/PullToRefresh-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'PullToRefresh' target in the 'PullToRefresh' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_5_0 8 | #warning "This project uses features only available in iOS SDK 5.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /Sample Project/PullToRefresh/TableViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // TableViewController.h 3 | // PullToRefresh 4 | // 5 | // Created by Bobo on 6/4/13. 6 | // Copyright (c) 2013 Bobo. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "BEMPullToRefresh.h" 11 | 12 | @interface TableViewController : UITableViewController 13 | 14 | @property(strong, nonatomic) BEMPullToRefresh * myPTR; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Sample Project/PullToRefresh/TableViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // TableViewController.m 3 | // PullToRefresh 4 | // 5 | // Created by Bobo on 6/4/13. 6 | // Copyright (c) 2013 Bobo. All rights reserved. 7 | // 8 | 9 | #import "TableViewController.h" 10 | 11 | @interface TableViewController () 12 | 13 | @end 14 | 15 | @implementation TableViewController 16 | 17 | //Hide status bar for iOS 7 18 | - (BOOL)prefersStatusBarHidden 19 | { 20 | return YES; 21 | } 22 | 23 | - (id)initWithStyle:(UITableViewStyle)style 24 | { 25 | self = [super initWithStyle:style]; 26 | if (self) { 27 | // Custom initialization 28 | } 29 | return self; 30 | } 31 | 32 | - (void)viewDidLoad 33 | { 34 | [super viewDidLoad]; 35 | 36 | //Initialization of the control 37 | self.myPTR = [[BEMPullToRefresh alloc] initWithNumberOfDots:5]; 38 | self.myPTR.delegate = self; 39 | [self.view addSubview:self.myPTR]; 40 | 41 | //Optional properties 42 | self.myPTR.dotColor = [UIColor lightGrayColor]; 43 | self.myPTR.thresholdToTrigger = 90; 44 | self.myPTR.animationSpeed = 1; 45 | 46 | } 47 | 48 | - (void)didReceiveMemoryWarning 49 | { 50 | [super didReceiveMemoryWarning]; 51 | // Dispose of any resources that can be recreated. 52 | } 53 | 54 | #pragma mark - Table view data source 55 | 56 | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView 57 | { 58 | // Return the number of sections. 59 | return 0; 60 | } 61 | 62 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section 63 | { 64 | // Return the number of rows in the section. 65 | return 0; 66 | } 67 | 68 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 69 | { 70 | static NSString *CellIdentifier = @"Cell"; 71 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath]; 72 | 73 | // Configure the cell... 74 | 75 | return cell; 76 | } 77 | 78 | 79 | #pragma mark - BEMPullToRefresh Methods 80 | 81 | - (void)scrollViewDidScroll:(UIScrollView *)scrollView { 82 | 83 | [self.myPTR viewDidScroll:scrollView]; 84 | } 85 | 86 | - (void)Refresh { 87 | 88 | NSLog(@"Refreshing..."); 89 | 90 | // Perform here the necessary to refresh the data (calling a JSON API for example). Once the data has been refreshed and display, call isDoneRefreshing. 91 | // For the example here, we used an NSTimer. 92 | [NSTimer scheduledTimerWithTimeInterval:7 target:self.myPTR selector:@selector(isDoneRefreshing) userInfo:nil repeats:NO]; 93 | } 94 | 95 | @end 96 | -------------------------------------------------------------------------------- /Sample Project/PullToRefresh/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Sample Project/PullToRefresh/en.lproj/MainStoryboard.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /Sample Project/PullToRefresh/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // PullToRefresh 4 | // 5 | // Created by Bobo on 6/4/13. 6 | // Copyright (c) 2013 Bobo. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "AppDelegate.h" 12 | 13 | int main(int argc, char *argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 17 | } 18 | } 19 | --------------------------------------------------------------------------------