Repository: cemolcay/PullToRefreshCoreText
Branch: master
Commit: 88e5b3ccc56f
Files: 26
Total size: 71.9 KB
Directory structure:
gitextract_kvmoynyz/
├── LICENSE
├── PullToRefreshCoreText/
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Base.lproj/
│ │ ├── LaunchScreen.xib
│ │ └── Main.storyboard
│ ├── Images.xcassets/
│ │ └── AppIcon.appiconset/
│ │ └── Contents.json
│ ├── Info.plist
│ ├── PullToRefreshCoreText/
│ │ ├── PullToRefreshCoreTextView.h
│ │ ├── PullToRefreshCoreTextView.m
│ │ ├── UIScrollView+PullToRefreshCoreText.h
│ │ └── UIScrollView+PullToRefreshCoreText.m
│ ├── TableViewController.h
│ ├── TableViewController.m
│ ├── ViewController.h
│ ├── ViewController.m
│ └── main.m
├── PullToRefreshCoreText.podspec
├── PullToRefreshCoreText.xcodeproj/
│ ├── project.pbxproj
│ ├── project.xcworkspace/
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata/
│ │ └── PullToRefreshCoreText.xccheckout
│ └── xcuserdata/
│ └── Cem.xcuserdatad/
│ ├── xcdebugger/
│ │ └── Breakpoints_v2.xcbkptlist
│ └── xcschemes/
│ ├── PullToRefreshCoreText.xcscheme
│ └── xcschememanagement.plist
├── PullToRefreshCoreTextTests/
│ ├── Info.plist
│ └── PullToRefreshCoreTextTests.m
└── README.md
================================================
FILE CONTENTS
================================================
================================================
FILE: LICENSE
================================================
Copyright (C) 2014, Cem Olcay
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.
================================================
FILE: PullToRefreshCoreText/AppDelegate.h
================================================
//
// AppDelegate.h
// PullToRefreshCoreText
//
// Created by Cem Olcay on 07/10/14.
// Copyright (c) 2014 questa. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@end
================================================
FILE: PullToRefreshCoreText/AppDelegate.m
================================================
//
// AppDelegate.m
// PullToRefreshCoreText
//
// Created by Cem Olcay on 07/10/14.
// Copyright (c) 2014 questa. All rights reserved.
//
#import "AppDelegate.h"
@interface AppDelegate ()
@end
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
return YES;
}
- (void)applicationWillResignActive:(UIApplication *)application {
// 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.
// 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.
}
- (void)applicationDidEnterBackground:(UIApplication *)application {
// 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.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}
- (void)applicationWillEnterForeground:(UIApplication *)application {
// 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.
}
- (void)applicationDidBecomeActive:(UIApplication *)application {
// 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.
}
- (void)applicationWillTerminate:(UIApplication *)application {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}
@end
================================================
FILE: PullToRefreshCoreText/Base.lproj/LaunchScreen.xib
================================================
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6214" systemVersion="14A314h" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6207"/>
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="iN0-l3-epB">
<rect key="frame" x="0.0" y="0.0" width="480" height="480"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" Copyright (c) 2014 questa. All rights reserved." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye">
<rect key="frame" x="20" y="439" width="441" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="PullToRefreshCoreText" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
<rect key="frame" x="20" y="140" width="441" height="43"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="kId-c2-rCX" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="bottom" multiplier="1/3" constant="1" id="5cJ-9S-tgC"/>
<constraint firstAttribute="centerX" secondItem="kId-c2-rCX" secondAttribute="centerX" id="Koa-jz-hwk"/>
<constraint firstAttribute="bottom" secondItem="8ie-xW-0ye" secondAttribute="bottom" constant="20" id="Kzo-t9-V3l"/>
<constraint firstItem="8ie-xW-0ye" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="MfP-vx-nX0"/>
<constraint firstAttribute="centerX" secondItem="8ie-xW-0ye" secondAttribute="centerX" id="ZEH-qu-HZ9"/>
<constraint firstItem="kId-c2-rCX" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="fvb-Df-36g"/>
</constraints>
<nil key="simulatedStatusBarMetrics"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<point key="canvasLocation" x="548" y="455"/>
</view>
</objects>
</document>
================================================
FILE: PullToRefreshCoreText/Base.lproj/Main.storyboard
================================================
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="9060" systemVersion="15B42" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="Y88-L3-P6Y">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9051"/>
</dependencies>
<scenes>
<!--Navigation Controller-->
<scene sceneID="2Ro-rl-dna">
<objects>
<navigationController id="BfW-tV-ppi" sceneMemberID="viewController">
<navigationBar key="navigationBar" contentMode="scaleToFill" id="it7-Wk-oHz">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<animations/>
</navigationBar>
<connections>
<segue destination="vXZ-lx-hvc" kind="relationship" relationship="rootViewController" id="dPq-b0-8jO"/>
</connections>
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Lea-LT-KEP" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-1772" y="-184"/>
</scene>
<!--View Controller-->
<scene sceneID="ufC-wZ-h7g">
<objects>
<viewController id="vXZ-lx-hvc" customClass="ViewController" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="jyV-Pf-zRb"/>
<viewControllerLayoutGuide type="bottom" id="2fi-mo-0CV"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="kh9-bI-dsS">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<animations/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
<navigationItem key="navigationItem" id="jga-Oo-vkh"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="x5A-6p-PRh" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-1063" y="-175"/>
</scene>
<!--TableView-->
<scene sceneID="nyJ-hi-JwI">
<objects>
<tableViewController id="NYm-Sv-Ubr" customClass="TableViewController" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" id="LWD-fS-cgE">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<animations/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<sections/>
<connections>
<outlet property="dataSource" destination="NYm-Sv-Ubr" id="LmZ-hJ-wt0"/>
<outlet property="delegate" destination="NYm-Sv-Ubr" id="Kln-sd-eCv"/>
</connections>
</tableView>
<navigationItem key="navigationItem" title="TableView" id="lqh-9m-icR"/>
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Jfr-ZC-dYh" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-1063" y="570"/>
</scene>
<!--Navigation Controller-->
<scene sceneID="trH-2U-2BI">
<objects>
<navigationController automaticallyAdjustsScrollViewInsets="NO" id="Y88-L3-P6Y" sceneMemberID="viewController">
<toolbarItems/>
<navigationBar key="navigationBar" contentMode="scaleToFill" id="IIp-nV-0DY">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<animations/>
</navigationBar>
<nil name="viewControllers"/>
<connections>
<segue destination="NYm-Sv-Ubr" kind="relationship" relationship="rootViewController" id="nlG-0J-7zX"/>
</connections>
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Jrw-8w-Osb" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-1772" y="570"/>
</scene>
</scenes>
</document>
================================================
FILE: PullToRefreshCoreText/Images.xcassets/AppIcon.appiconset/Contents.json
================================================
{
"images" : [
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
================================================
FILE: PullToRefreshCoreText/Info.plist
================================================
<?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>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>com.questa.$(PRODUCT_NAME:rfc1034identifier)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UIStatusBarHidden</key>
<false/>
<key>UIStatusBarStyle</key>
<string>UIStatusBarStyleDefault</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
</array>
</dict>
</plist>
================================================
FILE: PullToRefreshCoreText/PullToRefreshCoreText/PullToRefreshCoreTextView.h
================================================
//
// PullToRefreshCoreTextView.h
// PullToRefreshCoreText
//
// Created by Cem Olcay on 14/10/14.
// Copyright (c) 2014 questa. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <CoreText/CoreText.h>
typedef void(^pullToRefreshAction)(void);
typedef NS_ENUM(NSUInteger, PullToRefreshCoreTextStatus) {
PullToRefreshCoreTextStatusHidden,
PullToRefreshCoreTextStatusDragging,
PullToRefreshCoreTextStatusTriggered,
};
@interface PullToRefreshCoreTextView : UIView
@property (copy) pullToRefreshAction action;
@property (nonatomic, assign) PullToRefreshCoreTextStatus status;
@property (nonatomic, assign, getter=isLoading) BOOL loading;
@property (nonatomic, strong) NSString *pullText;
@property (nonatomic, strong) UIColor *pullTextColor;
@property (nonatomic, strong) UIFont *pullTextFont;
@property (nonatomic, strong) NSString *refreshingText;
@property (nonatomic, strong) UIColor *refreshingTextColor;
@property (nonatomic, strong) UIFont *refreshingTextFont;
@property (nonatomic, weak) UIScrollView *scrollView;
@property (nonatomic, assign) CGFloat triggerOffset;
@property (nonatomic, assign) CGFloat triggerThreshold;
- (instancetype)initWithFrame:(CGRect)frame
pullText:(NSString *)pullText
pullTextColor:(UIColor *)pullTextColor
pullTextFont:(UIFont *)pullTextFont
refreshingText:(NSString *)refreshingText
refreshingTextColor:(UIColor *)refreshingTextColor
refreshingTextFont:(UIFont *)refreshingTextFont
action:(pullToRefreshAction)action;
- (void)endLoading;
@end
================================================
FILE: PullToRefreshCoreText/PullToRefreshCoreText/PullToRefreshCoreTextView.m
================================================
//
// PullToRefreshCoreTextView.m
// PullToRefreshCoreText
//
// Created by Cem Olcay on 14/10/14.
// Copyright (c) 2014 questa. All rights reserved.
//
#import "PullToRefreshCoreTextView.h"
@implementation NSString (Glyphs)
-(UIBezierPath*)bezierPathWithFont:(UIFont*)font {
CTFontRef ctFont = CTFontCreateWithName((__bridge CFStringRef)font.fontName, font.pointSize, NULL);
NSAttributedString *attributed = [[NSAttributedString alloc] initWithString:self attributes:[NSDictionary dictionaryWithObject:(__bridge id)ctFont forKey:(__bridge NSString*)kCTFontAttributeName]];
CFRelease(ctFont);
CGMutablePathRef letters = CGPathCreateMutable();
CTLineRef line = CTLineCreateWithAttributedString((__bridge CFAttributedStringRef)attributed);
CFArrayRef runArray = CTLineGetGlyphRuns(line);
for (CFIndex runIndex = 0; runIndex < CFArrayGetCount(runArray); runIndex++)
{
CTRunRef run = (CTRunRef)CFArrayGetValueAtIndex(runArray, runIndex);
CTFontRef runFont = CFDictionaryGetValue(CTRunGetAttributes(run), kCTFontAttributeName);
for (CFIndex runGlyphIndex = 0; runGlyphIndex < CTRunGetGlyphCount(run); runGlyphIndex++)
{
CFRange thisGlyphRange = CFRangeMake(runGlyphIndex, 1);
CGGlyph glyph;
CGPoint position;
CTRunGetGlyphs(run, thisGlyphRange, &glyph);
CTRunGetPositions(run, thisGlyphRange, &position);
CGPathRef letter = CTFontCreatePathForGlyph(runFont, glyph, NULL);
CGAffineTransform t = CGAffineTransformMakeTranslation(position.x, position.y);
CGPathAddPath(letters, &t, letter);
CGPathRelease(letter);
}
}
UIBezierPath *path = [UIBezierPath bezierPathWithCGPath:letters];
CGRect boundingBox = CGPathGetBoundingBox(letters);
CGPathRelease(letters);
CFRelease(line);
// The path is upside down (CG coordinate system)
[path applyTransform:CGAffineTransformMakeScale(1.0, -1.0)];
[path applyTransform:CGAffineTransformMakeTranslation(0.0, boundingBox.size.height)];
return path;
}
@end
@implementation PullToRefreshCoreTextView
#pragma mark - Lifecycle
- (instancetype)initWithFrame:(CGRect)frame
pullText:(NSString *)pullText
pullTextColor:(UIColor *)pullTextColor
pullTextFont:(UIFont *)pullTextFont
refreshingText:(NSString *)refreshingText
refreshingTextColor:(UIColor *)refreshingTextColor
refreshingTextFont:(UIFont *)refreshingTextFont
action:(pullToRefreshAction)action {
if ((self = [super initWithFrame:frame])) {
self.pullText = pullText;
self.pullTextColor = pullTextColor;
self.pullTextFont = pullTextFont;
self.refreshingText = refreshingText;
self.refreshingTextColor = refreshingTextColor;
self.refreshingTextFont = refreshingTextFont;
self.action = action;
self.status = PullToRefreshCoreTextStatusHidden;
self.loading = NO;
self.triggerOffset = self.frame.size.height;
self.triggerThreshold = self.frame.size.height;
}
return self;
}
#pragma mark - Logic
- (void)startLoading {
[self setLoading:YES];
self.action ();
}
- (void)endLoading {
[self setLoading:NO];
if (self.scrollView.contentInset.top > 0) {
[UIView animateWithDuration:0.2 animations:^{
self.scrollView.contentInset = UIEdgeInsetsMake(0, 0, 0, 0);
}];
}
}
- (CAShapeLayer *)pullTextLayer {
CAShapeLayer *pull = [CAShapeLayer layer];
[pull setPath:[[self.pullText bezierPathWithFont:self.pullTextFont] CGPath]];
[pull setStrokeColor:[self.pullTextColor CGColor]];
[pull setFillColor:[[UIColor clearColor] CGColor]];
[pull setLineWidth:0.5];
[pull setSpeed:0];
float textSize = [self.pullText sizeWithAttributes:@{NSFontAttributeName:self.pullTextFont}].width;
[pull setPosition:CGPointMake(pull.position.x + (self.frame.size.width-textSize)/2, 0)];
CABasicAnimation *textAnimation = [CABasicAnimation animationWithKeyPath:@"strokeEnd"];
[textAnimation setFromValue:@0];
[textAnimation setToValue:@1];
[textAnimation setDuration:1];
[textAnimation setRemovedOnCompletion:NO];
[pull addAnimation:textAnimation forKey:@"textAnimation"];
return pull;
}
- (CATextLayer *)refreshingTextLayer {
CATextLayer *text = [CATextLayer layer];
[text setFrame:self.bounds];
[text setString:(id)self.refreshingText];
CTFontRef fontRef = CTFontCreateWithName((__bridge CFStringRef)self.refreshingTextFont.fontName, self.refreshingTextFont.pointSize, NULL);
[text setFont:fontRef];
CFRelease(fontRef);
[text setFontSize:self.refreshingTextFont.pointSize];
[text setForegroundColor:[self.refreshingTextColor CGColor]];
[text setContentsScale:[[UIScreen mainScreen] scale]];
float textSize = [self.refreshingText sizeWithAttributes:@{NSFontAttributeName:self.refreshingTextFont}].width;
[text setPosition:CGPointMake(self.frame.size.width-textSize/2, 13)]; //center text in master layer
CALayer *maskLayer = [CALayer layer];
maskLayer.backgroundColor = [[UIColor colorWithRed:0.0f green:0.0f blue:0.0f alpha:0.3] CGColor];
maskLayer.contents = (id)[[UIImage imageNamed:@"Mask.png"] CGImage];
maskLayer.contentsGravity = kCAGravityCenter;
maskLayer.frame = CGRectMake(self.frame.size.width * -1, 0.0f, self.frame.size.width * 2, self.frame.size.height);
text.mask = maskLayer;
CABasicAnimation *maskAnim = [CABasicAnimation animationWithKeyPath:@"position.x"];
maskAnim.byValue = [NSNumber numberWithFloat:self.frame.size.width];
maskAnim.repeatCount = HUGE_VALF;
maskAnim.duration = 2.0f;
[maskLayer addAnimation:maskAnim forKey:@"slideAnim"];
return text;
}
#pragma mark - Interaction
- (void)scrollViewDidScroll:(UIPanGestureRecognizer *)pan {
// Check if the superview's frame width has changed.
if (self.superview.bounds.size.width != self.frame.size.width) {
// Update our frame with the new width.
CGRect newFrame = self.frame;
newFrame.size.width = self.superview.bounds.size.width;
self.frame = newFrame;
// Update the layers.
[self setLoading:self.isLoading];
}
if (pan.state == UIGestureRecognizerStateChanged) {
if (self.isLoading)
return;
CGFloat offset = self.scrollView.contentOffset.y + self.triggerThreshold;
if (offset <= 0) {
//animate pull text
CGFloat fractionDragged = -offset/self.triggerOffset;
[(CALayer *)[self.layer.sublayers firstObject] setTimeOffset:MIN(1, fractionDragged)];
//update state
if (fractionDragged >= 1) {
self.status = PullToRefreshCoreTextStatusTriggered;
} else {
self.status = PullToRefreshCoreTextStatusDragging;
}
} else {
self.status = PullToRefreshCoreTextStatusHidden;
}
}
else if (pan.state == UIGestureRecognizerStateEnded || pan.state == UIGestureRecognizerStateCancelled) {
if (self.status == PullToRefreshCoreTextStatusTriggered) {
[self startLoading];
[UIView animateWithDuration:0.2 animations:^{
[self.scrollView setContentInset:UIEdgeInsetsMake(self.triggerOffset + self.triggerThreshold, 0, 0, 0)];
}];
} else {
[(CALayer *)[self.layer.sublayers firstObject] setTimeOffset:0];
}
}
}
#pragma mark - Properties
- (void)setScrollView:(UIScrollView *)scrollView {
_scrollView = scrollView;
[self.scrollView.panGestureRecognizer addTarget:self action:@selector(scrollViewDidScroll:)];
}
- (void)setLoading:(BOOL)loading {
_loading = loading;
self.layer.sublayers = nil;
if (loading) {
[self.layer addSublayer:[self refreshingTextLayer]];
} else {
[self.layer addSublayer:[self pullTextLayer]];
}
}
@end
================================================
FILE: PullToRefreshCoreText/PullToRefreshCoreText/UIScrollView+PullToRefreshCoreText.h
================================================
//
// UIScrollView+PullToRefreshCoreText.h
// PullToRefreshCoreText
//
// Created by Cem Olcay on 07/10/14.
// Copyright (c) 2014 questa. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "PullToRefreshCoreTextView.h"
#define DefaultTextColor [UIColor blackColor]
#define DefaultTextFont [UIFont fontWithName:@"HelveticaNeue-UltraLight" size:30]
@interface UIScrollView (PullToRefreshCoreText)
@property (nonatomic, strong) PullToRefreshCoreTextView *pullToRefreshView;
- (void)addPullToRefreshWithPullText:(NSString *)pullText
action:(pullToRefreshAction)action;
- (void)addPullToRefreshWithPullText:(NSString *)pullText
refreshingText:(NSString *)refreshingText
action:(pullToRefreshAction)action;
- (void)addPullToRefreshWithPullText:(NSString *)pullText
font:(UIFont *)font
action:(pullToRefreshAction)action;
- (void)addPullToRefreshWithPullText:(NSString *)pullText
refreshingText:(NSString *)refreshingText
font:(UIFont *)font
action:(pullToRefreshAction)action;
- (void)addPullToRefreshWithPullText:(NSString *)pullText
pullTextColor:(UIColor *)pullTextColor
refreshingText:(NSString *)refreshingText
refreshingTextColor:(UIColor *)refreshingTextColor
font:(UIFont *)font
action:(pullToRefreshAction)action;
- (void)addPullToRefreshWithPullText:(NSString *)pullText
pullTextColor:(UIColor *)pullTextColor
pullTextFont:(UIFont *)pullTextFont
refreshingText:(NSString *)refreshingText
refreshingTextColor:(UIColor *)refreshingTextColor
refreshingTextFont:(UIFont *)refreshingTextFont
action:(pullToRefreshAction)action;
- (void)finishLoading;
@end
================================================
FILE: PullToRefreshCoreText/PullToRefreshCoreText/UIScrollView+PullToRefreshCoreText.m
================================================
//
// UIScrollView+PullToRefreshCoreText.m
// PullToRefreshCoreText
//
// Created by Cem Olcay on 07/10/14.
// Copyright (c) 2014 questa. All rights reserved.
//
#import "UIScrollView+PullToRefreshCoreText.h"
#import <objc/runtime.h>
@implementation UIScrollView (PullToRefreshCoreText)
#pragma mark - Lifecycle
- (void)addPullToRefreshWithPullText:(NSString *)pullText
action:(pullToRefreshAction)action {
[self addPullToRefreshWithPullText:pullText pullTextColor:DefaultTextColor pullTextFont:DefaultTextFont refreshingText:pullText refreshingTextColor:DefaultTextColor refreshingTextFont:DefaultTextFont action:action];
}
- (void)addPullToRefreshWithPullText:(NSString *)pullText
refreshingText:(NSString *)refreshingText
action:(pullToRefreshAction)action {
[self addPullToRefreshWithPullText:pullText pullTextColor:DefaultTextColor pullTextFont:DefaultTextFont refreshingText:refreshingText refreshingTextColor:DefaultTextColor refreshingTextFont:DefaultTextFont action:action];
}
- (void)addPullToRefreshWithPullText:(NSString *)pullText
font:(UIFont *)font
action:(pullToRefreshAction)action {
[self addPullToRefreshWithPullText:pullText pullTextColor:DefaultTextColor pullTextFont:font refreshingText:pullText refreshingTextColor:DefaultTextColor refreshingTextFont:font action:action];
}
- (void)addPullToRefreshWithPullText:(NSString *)pullText
refreshingText:(NSString *)refreshingText
font:(UIFont *)font
action:(pullToRefreshAction)action {
[self addPullToRefreshWithPullText:pullText pullTextColor:DefaultTextColor pullTextFont:DefaultTextFont refreshingText:pullText refreshingTextColor:DefaultTextColor refreshingTextFont:DefaultTextFont action:action];
}
- (void)addPullToRefreshWithPullText:(NSString *)pullText
pullTextColor:(UIColor *)pullTextColor
refreshingText:(NSString *)refreshingText
refreshingTextColor:(UIColor *)refreshingTextColor
font:(UIFont *)font
action:(pullToRefreshAction)action {
[self addPullToRefreshWithPullText:pullText pullTextColor:pullTextColor pullTextFont:font refreshingText:refreshingText refreshingTextColor:refreshingTextColor refreshingTextFont:font action:action];
}
- (void)addPullToRefreshWithPullText:(NSString *)pullText
pullTextColor:(UIColor *)pullTextColor
pullTextFont:(UIFont *)pullTextFont
refreshingText:(NSString *)refreshingText
refreshingTextColor:(UIColor *)refreshingTextColor
refreshingTextFont:(UIFont *)refreshingTextFont
action:(pullToRefreshAction)action {
if (self.pullToRefreshView) return;
float ptrH = [self labelHeightForString:pullText labelWidth:self.bounds.size.width andFont:pullTextFont];
CGRect ptrRect = CGRectMake(0, -ptrH, self.bounds.size.width, ptrH);
self.pullToRefreshView = [[PullToRefreshCoreTextView alloc] initWithFrame:ptrRect pullText:pullText pullTextColor:pullTextColor pullTextFont:pullTextFont refreshingText:refreshingText refreshingTextColor:refreshingTextColor refreshingTextFont:refreshingTextFont action:action];
[self.pullToRefreshView setScrollView:self];
[self addSubview:self.pullToRefreshView];
}
#pragma mark - Loading
- (void)finishLoading {
[self.pullToRefreshView endLoading];
}
#pragma mark - Utils
- (CGFloat)labelHeightForString:(NSString*)string labelWidth:(float)width andFont:(UIFont*)font {
NSAttributedString *attributedText = [[NSAttributedString alloc] initWithString:string attributes:@{NSFontAttributeName: font}];
CGRect rect = [attributedText boundingRectWithSize:(CGSize){width, CGFLOAT_MAX} options:NSStringDrawingUsesLineFragmentOrigin context:nil];
return rect.size.height;
}
#pragma mark - Properties
- (void)setPullToRefreshView:(PullToRefreshCoreTextView *)pullToRefreshView {
objc_setAssociatedObject(self, @selector(pullToRefreshView), pullToRefreshView, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
}
- (PullToRefreshCoreTextView *)pullToRefreshView {
return objc_getAssociatedObject(self, @selector(pullToRefreshView));
}
@end
================================================
FILE: PullToRefreshCoreText/TableViewController.h
================================================
//
// TableViewController.h
// PullToRefreshCoreText
//
// Created by Codi Bonney on 12/3/15.
// Copyright © 2015 questa. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface TableViewController : UITableViewController
@end
================================================
FILE: PullToRefreshCoreText/TableViewController.m
================================================
//
// TableViewController.m
// PullToRefreshCoreText
//
// Created by Codi Bonney on 12/3/15.
// Copyright © 2015 questa. All rights reserved.
//
#import "TableViewController.h"
#import "UIScrollView+PullToRefreshCoreText.h"
static NSString* const KCellIdentifier = @"PTRCTTableCell";
@interface TableViewController ()
@property (nonatomic) NSMutableArray* datasource;
@end
@implementation TableViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.datasource = [NSMutableArray new];
// TODO: add support for UIRectEdgeAll
self.edgesForExtendedLayout = UIRectEdgeNone;
//add pull to refresh
__weak typeof(self) weakSelf = self;
[self.tableView addPullToRefreshWithPullText:@"Pull To Refresh" pullTextColor:[UIColor blackColor] pullTextFont:DefaultTextFont refreshingText:@"Refreshing" refreshingTextColor:[UIColor blueColor] refreshingTextFont:DefaultTextFont action:^{
[weakSelf loadItems];
}];
//add some items to scroll view
for (int i = 0; i < 2; i++) {
[self addNewItem];
}
}
- (void)loadItems {
__weak typeof(UIScrollView *) weakScrollView = self.tableView;
__weak typeof(self) weakSelf = self;
dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, 3 * NSEC_PER_SEC);
dispatch_after(popTime, dispatch_get_main_queue(), ^(void){
[weakSelf addNewItem];
[weakScrollView finishLoading];
});
}
- (void)addNewItem {
[self.datasource addObject:[self randomColor]];
[self.tableView reloadData];
}
- (UIColor *)randomColor {
CGFloat hue = ( arc4random() % 256 / 256.0 ); // 0.0 to 1.0
CGFloat saturation = ( arc4random() % 128 / 256.0 ) + 0.5; // 0.5 to 1.0, away from white
CGFloat brightness = ( arc4random() % 128 / 256.0 ) + 0.5; // 0.5 to 1.0, away from black
return [UIColor colorWithHue:hue saturation:saturation brightness:brightness alpha:1];
}
#pragma mark - UITableView DataSource
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
return 1;
}
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
return self.datasource.count;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
UITableViewCell* cell = [tableView dequeueReusableCellWithIdentifier:KCellIdentifier];
if (!cell) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:KCellIdentifier];
}
cell.textLabel.text = @(indexPath.row+1).stringValue;
cell.backgroundColor = self.datasource[indexPath.row];
return cell;
}
@end
================================================
FILE: PullToRefreshCoreText/ViewController.h
================================================
//
// ViewController.h
// PullToRefreshCoreText
//
// Created by Cem Olcay on 07/10/14.
// Copyright (c) 2014 questa. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface ViewController : UIViewController
@end
================================================
FILE: PullToRefreshCoreText/ViewController.m
================================================
//
// ViewController.m
// PullToRefreshCoreText
//
// Created by Cem Olcay on 07/10/14.
// Copyright (c) 2014 questa. All rights reserved.
//
#import "ViewController.h"
#import "UIScrollView+PullToRefreshCoreText.h"
@interface ViewController ()
@property (nonatomic, strong) UIScrollView *scrollView;
@property (nonatomic, assign) CGFloat contentHeight;
@property (nonatomic, assign) NSInteger itemCount;
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
[self setupScrollView];
}
#pragma mark - UIScrollView
- (void)setupScrollView {
self.contentHeight = 10;
self.itemCount = 0;
//Create ScrollView
self.scrollView = [[UIScrollView alloc] initWithFrame:self.view.frame];
[self.scrollView setContentSize:CGSizeMake(self.view.frame.size.width, self.scrollView.frame.size.height + 1)];
[self.view addSubview:self.scrollView];
//add pull to refresh
__weak typeof(self) weakSelf = self;
[self.scrollView addPullToRefreshWithPullText:@"Pull To Refresh" pullTextColor:[UIColor blackColor] pullTextFont:DefaultTextFont refreshingText:@"Refreshing" refreshingTextColor:[UIColor blueColor] refreshingTextFont:DefaultTextFont action:^{
[weakSelf loadItems];
}];
//add some items to scroll view
for (int i = 0; i < 2; i++) {
[self addNewItem];
}
}
- (void)loadItems {
__weak typeof(UIScrollView *) weakScrollView = self.scrollView;
__weak typeof(self) weakSelf = self;
dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, 3 * NSEC_PER_SEC);
dispatch_after(popTime, dispatch_get_main_queue(), ^(void){
[weakSelf addNewItem];
[weakScrollView finishLoading];
});
}
- (void)addNewItem {
[self.scrollView addSubview:[self item]];
if (self.scrollView.contentSize.height < self.contentHeight)
[self.scrollView setContentSize:CGSizeMake(self.scrollView.contentSize.width, self.contentHeight)];
}
- (UILabel *)item {
UILabel *lbl = [[UILabel alloc] initWithFrame:CGRectMake(10, self.contentHeight, self.view.frame.size.width - 20, 150)];
[lbl setText:[NSString stringWithFormat:@"item %lu", self.itemCount++]];
[lbl setTextAlignment:NSTextAlignmentCenter];
[lbl setBackgroundColor:[self randomColor]];
[lbl setFont:DefaultTextFont];
self.contentHeight += 160;
return lbl;
}
- (UIColor *)randomColor {
CGFloat hue = ( arc4random() % 256 / 256.0 ); // 0.0 to 1.0
CGFloat saturation = ( arc4random() % 128 / 256.0 ) + 0.5; // 0.5 to 1.0, away from white
CGFloat brightness = ( arc4random() % 128 / 256.0 ) + 0.5; // 0.5 to 1.0, away from black
return [UIColor colorWithHue:hue saturation:saturation brightness:brightness alpha:1];
}
@end
================================================
FILE: PullToRefreshCoreText/main.m
================================================
//
// main.m
// PullToRefreshCoreText
//
// Created by Cem Olcay on 07/10/14.
// Copyright (c) 2014 questa. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "AppDelegate.h"
int main(int argc, char * argv[]) {
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
}
================================================
FILE: PullToRefreshCoreText.podspec
================================================
#
# Be sure to run `pod spec lint PullToRefreshCoreText.podspec' to ensure this is a
# valid spec and to remove all comments including this before submitting the spec.
#
# To learn more about Podspec attributes see http://docs.cocoapods.org/specification.html
# To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/
#
Pod::Spec.new do |s|
# ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# These will help people to find your library, and whilst it
# can feel like a chore to fill in it's definitely to your advantage. The
# summary should be tweet-length, and the description more in depth.
#
s.name = "PullToRefreshCoreText"
s.version = "0.2"
s.summary = "PullToRefresh extension for all UIScrollView type classes with animated text drawing style "
s.description = <<-DESC
https://github.com/cemolcay/PullToRefreshCoreText/blob/master/README.md
DESC
s.homepage = "https://github.com/cemolcay/PullToRefreshCoreText"
# s.screenshots = "www.example.com/screenshots_1.gif", "www.example.com/screenshots_2.gif"
# ――― Spec License ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# Licensing your code is important. See http://choosealicense.com for more info.
# CocoaPods will detect a license file if there is a named LICENSE*
# Popular ones are 'MIT', 'BSD' and 'Apache License, Version 2.0'.
#
s.license = "MIT"
# s.license = { :type => "MIT", :file => "FILE_LICENSE" }
# ――― Author Metadata ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# Specify the authors of the library, with email addresses. Email addresses
# of the authors are extracted from the SCM log. E.g. $ git log. CocoaPods also
# accepts just a name if you'd rather not provide an email address.
#
# Specify a social_media_url where others can refer to, for example a twitter
# profile URL.
#
s.author = { "cemolcay" => "ccemolcay@gmail.com" }
# Or just: s.author = "cemolcay"
# s.authors = { "cemolcay" => "ccemolcay@gmail.com" }
# s.social_media_url = "http://twitter.com/cemolcay"
# ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# If this Pod runs only on iOS or OS X, then specify the platform and
# the deployment target. You can optionally include the target after the platform.
#
# s.platform = :ios
s.platform = :ios, "7.0"
# When using multiple platforms
# s.ios.deployment_target = "5.0"
# s.osx.deployment_target = "10.7"
# ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# Specify the location from where the source should be retrieved.
# Supports git, hg, bzr, svn and HTTP.
#
s.source = { :git => "https://github.com/cemolcay/PullToRefreshCoreText.git", :tag => "v0.2" }
# ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# CocoaPods is smart about how it includes source code. For source files
# giving a folder will include any h, m, mm, c & cpp files. For header
# files it will include any header in the folder.
# Not including the public_header_files will make all headers public.
#
s.source_files = "PullToRefreshCoreText/PullToRefreshCoreText/*.{h,m}"
# s.public_header_files = "Classes/**/*.h"
# ――― Resources ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# A list of resources included with the Pod. These are copied into the
# target bundle with a build phase script. Anything else will be cleaned.
# You can preserve files from being cleaned, please don't preserve
# non-essential files like tests, examples and documentation.
#
# s.resource = "icon.png"
s.resources = "PullToRefreshCoreText/PullToRefreshCoreText/*.png"
# s.preserve_paths = "FilesToSave", "MoreFilesToSave"
# ――― Project Linking ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# Link your library with frameworks, or libraries. Libraries do not include
# the lib prefix of their name.
#
s.framework = "CoreText"
# s.frameworks = "SomeFramework", "AnotherFramework"
# s.library = "iconv"
# s.libraries = "iconv", "xml2"
# ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# If your library depends on compiler flags you can set them in the xcconfig hash
# where they will only apply to your library. If you depend on other Podspecs
# you can include multiple dependencies to ensure it works.
s.requires_arc = true
# s.xcconfig = { "HEADER_SEARCH_PATHS" => "$(SDKROOT)/usr/include/libxml2" }
# s.dependency "JSONKit", "~> 1.4"
end
================================================
FILE: PullToRefreshCoreText.xcodeproj/project.pbxproj
================================================
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
B29BC27919E4178E00365B69 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = B29BC27819E4178E00365B69 /* main.m */; };
B29BC27C19E4178E00365B69 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = B29BC27B19E4178E00365B69 /* AppDelegate.m */; };
B29BC27F19E4178E00365B69 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B29BC27E19E4178E00365B69 /* ViewController.m */; };
B29BC28219E4178E00365B69 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B29BC28019E4178E00365B69 /* Main.storyboard */; };
B29BC28419E4178E00365B69 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B29BC28319E4178E00365B69 /* Images.xcassets */; };
B29BC28719E4178E00365B69 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = B29BC28519E4178E00365B69 /* LaunchScreen.xib */; };
B29BC29319E4178E00365B69 /* PullToRefreshCoreTextTests.m in Sources */ = {isa = PBXBuildFile; fileRef = B29BC29219E4178E00365B69 /* PullToRefreshCoreTextTests.m */; };
B2D4613119F006ED00C6B60A /* Mask.png in Resources */ = {isa = PBXBuildFile; fileRef = B2D4612C19F006ED00C6B60A /* Mask.png */; };
B2D4613219F006ED00C6B60A /* PullToRefreshCoreTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = B2D4612E19F006ED00C6B60A /* PullToRefreshCoreTextView.m */; };
B2D4613319F006ED00C6B60A /* UIScrollView+PullToRefreshCoreText.m in Sources */ = {isa = PBXBuildFile; fileRef = B2D4613019F006ED00C6B60A /* UIScrollView+PullToRefreshCoreText.m */; };
C00613BA1C10F7DC00E38B9E /* TableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C00613B91C10F7DC00E38B9E /* TableViewController.m */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
B29BC28D19E4178E00365B69 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = B29BC26B19E4178E00365B69 /* Project object */;
proxyType = 1;
remoteGlobalIDString = B29BC27219E4178E00365B69;
remoteInfo = PullToRefreshCoreText;
};
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
B29BC27319E4178E00365B69 /* PullToRefreshCoreText.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PullToRefreshCoreText.app; sourceTree = BUILT_PRODUCTS_DIR; };
B29BC27719E4178E00365B69 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
B29BC27819E4178E00365B69 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
B29BC27A19E4178E00365B69 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
B29BC27B19E4178E00365B69 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
B29BC27D19E4178E00365B69 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = "<group>"; };
B29BC27E19E4178E00365B69 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; };
B29BC28119E4178E00365B69 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
B29BC28319E4178E00365B69 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
B29BC28619E4178E00365B69 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = "<group>"; };
B29BC28C19E4178E00365B69 /* PullToRefreshCoreTextTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PullToRefreshCoreTextTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
B29BC29119E4178E00365B69 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
B29BC29219E4178E00365B69 /* PullToRefreshCoreTextTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PullToRefreshCoreTextTests.m; sourceTree = "<group>"; };
B2D4612C19F006ED00C6B60A /* Mask.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Mask.png; sourceTree = "<group>"; };
B2D4612D19F006ED00C6B60A /* PullToRefreshCoreTextView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PullToRefreshCoreTextView.h; sourceTree = "<group>"; };
B2D4612E19F006ED00C6B60A /* PullToRefreshCoreTextView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PullToRefreshCoreTextView.m; sourceTree = "<group>"; };
B2D4612F19F006ED00C6B60A /* UIScrollView+PullToRefreshCoreText.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIScrollView+PullToRefreshCoreText.h"; sourceTree = "<group>"; };
B2D4613019F006ED00C6B60A /* UIScrollView+PullToRefreshCoreText.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIScrollView+PullToRefreshCoreText.m"; sourceTree = "<group>"; };
C00613B81C10F7DC00E38B9E /* TableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TableViewController.h; sourceTree = "<group>"; };
C00613B91C10F7DC00E38B9E /* TableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TableViewController.m; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
B29BC27019E4178E00365B69 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
B29BC28919E4178E00365B69 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
B29BC26A19E4178E00365B69 = {
isa = PBXGroup;
children = (
B29BC27519E4178E00365B69 /* PullToRefreshCoreText */,
B29BC28F19E4178E00365B69 /* PullToRefreshCoreTextTests */,
B29BC27419E4178E00365B69 /* Products */,
);
sourceTree = "<group>";
};
B29BC27419E4178E00365B69 /* Products */ = {
isa = PBXGroup;
children = (
B29BC27319E4178E00365B69 /* PullToRefreshCoreText.app */,
B29BC28C19E4178E00365B69 /* PullToRefreshCoreTextTests.xctest */,
);
name = Products;
sourceTree = "<group>";
};
B29BC27519E4178E00365B69 /* PullToRefreshCoreText */ = {
isa = PBXGroup;
children = (
B2D4612B19F006ED00C6B60A /* PullToRefreshCoreText */,
B29BC27A19E4178E00365B69 /* AppDelegate.h */,
B29BC27B19E4178E00365B69 /* AppDelegate.m */,
B29BC27D19E4178E00365B69 /* ViewController.h */,
B29BC27E19E4178E00365B69 /* ViewController.m */,
C00613B81C10F7DC00E38B9E /* TableViewController.h */,
C00613B91C10F7DC00E38B9E /* TableViewController.m */,
B29BC28019E4178E00365B69 /* Main.storyboard */,
B29BC28319E4178E00365B69 /* Images.xcassets */,
B29BC28519E4178E00365B69 /* LaunchScreen.xib */,
B29BC27619E4178E00365B69 /* Supporting Files */,
);
path = PullToRefreshCoreText;
sourceTree = "<group>";
};
B29BC27619E4178E00365B69 /* Supporting Files */ = {
isa = PBXGroup;
children = (
B29BC27719E4178E00365B69 /* Info.plist */,
B29BC27819E4178E00365B69 /* main.m */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
B29BC28F19E4178E00365B69 /* PullToRefreshCoreTextTests */ = {
isa = PBXGroup;
children = (
B29BC29219E4178E00365B69 /* PullToRefreshCoreTextTests.m */,
B29BC29019E4178E00365B69 /* Supporting Files */,
);
path = PullToRefreshCoreTextTests;
sourceTree = "<group>";
};
B29BC29019E4178E00365B69 /* Supporting Files */ = {
isa = PBXGroup;
children = (
B29BC29119E4178E00365B69 /* Info.plist */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
B2D4612B19F006ED00C6B60A /* PullToRefreshCoreText */ = {
isa = PBXGroup;
children = (
B2D4612C19F006ED00C6B60A /* Mask.png */,
B2D4612D19F006ED00C6B60A /* PullToRefreshCoreTextView.h */,
B2D4612E19F006ED00C6B60A /* PullToRefreshCoreTextView.m */,
B2D4612F19F006ED00C6B60A /* UIScrollView+PullToRefreshCoreText.h */,
B2D4613019F006ED00C6B60A /* UIScrollView+PullToRefreshCoreText.m */,
);
path = PullToRefreshCoreText;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
B29BC27219E4178E00365B69 /* PullToRefreshCoreText */ = {
isa = PBXNativeTarget;
buildConfigurationList = B29BC29619E4178E00365B69 /* Build configuration list for PBXNativeTarget "PullToRefreshCoreText" */;
buildPhases = (
B29BC26F19E4178E00365B69 /* Sources */,
B29BC27019E4178E00365B69 /* Frameworks */,
B29BC27119E4178E00365B69 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = PullToRefreshCoreText;
productName = PullToRefreshCoreText;
productReference = B29BC27319E4178E00365B69 /* PullToRefreshCoreText.app */;
productType = "com.apple.product-type.application";
};
B29BC28B19E4178E00365B69 /* PullToRefreshCoreTextTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = B29BC29919E4178E00365B69 /* Build configuration list for PBXNativeTarget "PullToRefreshCoreTextTests" */;
buildPhases = (
B29BC28819E4178E00365B69 /* Sources */,
B29BC28919E4178E00365B69 /* Frameworks */,
B29BC28A19E4178E00365B69 /* Resources */,
);
buildRules = (
);
dependencies = (
B29BC28E19E4178E00365B69 /* PBXTargetDependency */,
);
name = PullToRefreshCoreTextTests;
productName = PullToRefreshCoreTextTests;
productReference = B29BC28C19E4178E00365B69 /* PullToRefreshCoreTextTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
B29BC26B19E4178E00365B69 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0600;
ORGANIZATIONNAME = questa;
TargetAttributes = {
B29BC27219E4178E00365B69 = {
CreatedOnToolsVersion = 6.0.1;
};
B29BC28B19E4178E00365B69 = {
CreatedOnToolsVersion = 6.0.1;
TestTargetID = B29BC27219E4178E00365B69;
};
};
};
buildConfigurationList = B29BC26E19E4178E00365B69 /* Build configuration list for PBXProject "PullToRefreshCoreText" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = B29BC26A19E4178E00365B69;
productRefGroup = B29BC27419E4178E00365B69 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
B29BC27219E4178E00365B69 /* PullToRefreshCoreText */,
B29BC28B19E4178E00365B69 /* PullToRefreshCoreTextTests */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
B29BC27119E4178E00365B69 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
B29BC28219E4178E00365B69 /* Main.storyboard in Resources */,
B29BC28719E4178E00365B69 /* LaunchScreen.xib in Resources */,
B29BC28419E4178E00365B69 /* Images.xcassets in Resources */,
B2D4613119F006ED00C6B60A /* Mask.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
B29BC28A19E4178E00365B69 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
B29BC26F19E4178E00365B69 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
B29BC27F19E4178E00365B69 /* ViewController.m in Sources */,
C00613BA1C10F7DC00E38B9E /* TableViewController.m in Sources */,
B29BC27C19E4178E00365B69 /* AppDelegate.m in Sources */,
B2D4613219F006ED00C6B60A /* PullToRefreshCoreTextView.m in Sources */,
B2D4613319F006ED00C6B60A /* UIScrollView+PullToRefreshCoreText.m in Sources */,
B29BC27919E4178E00365B69 /* main.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
B29BC28819E4178E00365B69 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
B29BC29319E4178E00365B69 /* PullToRefreshCoreTextTests.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
B29BC28E19E4178E00365B69 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = B29BC27219E4178E00365B69 /* PullToRefreshCoreText */;
targetProxy = B29BC28D19E4178E00365B69 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin PBXVariantGroup section */
B29BC28019E4178E00365B69 /* Main.storyboard */ = {
isa = PBXVariantGroup;
children = (
B29BC28119E4178E00365B69 /* Base */,
);
name = Main.storyboard;
sourceTree = "<group>";
};
B29BC28519E4178E00365B69 /* LaunchScreen.xib */ = {
isa = PBXVariantGroup;
children = (
B29BC28619E4178E00365B69 /* Base */,
);
name = LaunchScreen.xib;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
B29BC29419E4178E00365B69 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
};
name = Debug;
};
B29BC29519E4178E00365B69 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = YES;
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
};
name = Release;
};
B29BC29719E4178E00365B69 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
INFOPLIST_FILE = PullToRefreshCoreText/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_NAME = "$(TARGET_NAME)";
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
B29BC29819E4178E00365B69 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
INFOPLIST_FILE = PullToRefreshCoreText/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_NAME = "$(TARGET_NAME)";
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
};
B29BC29A19E4178E00365B69 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)",
);
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
INFOPLIST_FILE = PullToRefreshCoreTextTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/PullToRefreshCoreText.app/PullToRefreshCoreText";
};
name = Debug;
};
B29BC29B19E4178E00365B69 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)",
);
INFOPLIST_FILE = PullToRefreshCoreTextTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/PullToRefreshCoreText.app/PullToRefreshCoreText";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
B29BC26E19E4178E00365B69 /* Build configuration list for PBXProject "PullToRefreshCoreText" */ = {
isa = XCConfigurationList;
buildConfigurations = (
B29BC29419E4178E00365B69 /* Debug */,
B29BC29519E4178E00365B69 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
B29BC29619E4178E00365B69 /* Build configuration list for PBXNativeTarget "PullToRefreshCoreText" */ = {
isa = XCConfigurationList;
buildConfigurations = (
B29BC29719E4178E00365B69 /* Debug */,
B29BC29819E4178E00365B69 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
B29BC29919E4178E00365B69 /* Build configuration list for PBXNativeTarget "PullToRefreshCoreTextTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
B29BC29A19E4178E00365B69 /* Debug */,
B29BC29B19E4178E00365B69 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = B29BC26B19E4178E00365B69 /* Project object */;
}
================================================
FILE: PullToRefreshCoreText.xcodeproj/project.xcworkspace/contents.xcworkspacedata
================================================
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:PullToRefreshCoreText.xcodeproj">
</FileRef>
</Workspace>
================================================
FILE: PullToRefreshCoreText.xcodeproj/project.xcworkspace/xcshareddata/PullToRefreshCoreText.xccheckout
================================================
<?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>IDESourceControlProjectFavoriteDictionaryKey</key>
<false/>
<key>IDESourceControlProjectIdentifier</key>
<string>C6F89E8B-DE7C-40DA-96D9-07D64821BF19</string>
<key>IDESourceControlProjectName</key>
<string>PullToRefreshCoreText</string>
<key>IDESourceControlProjectOriginsDictionary</key>
<dict>
<key>51D0BD135080145A51AAFC376EF45758245B9CE6</key>
<string>https://github.com/cemolcay/PullToRefreshCoreText.git</string>
</dict>
<key>IDESourceControlProjectPath</key>
<string>PullToRefreshCoreText.xcodeproj</string>
<key>IDESourceControlProjectRelativeInstallPathDictionary</key>
<dict>
<key>51D0BD135080145A51AAFC376EF45758245B9CE6</key>
<string>../..</string>
</dict>
<key>IDESourceControlProjectURL</key>
<string>https://github.com/cemolcay/PullToRefreshCoreText.git</string>
<key>IDESourceControlProjectVersion</key>
<integer>111</integer>
<key>IDESourceControlProjectWCCIdentifier</key>
<string>51D0BD135080145A51AAFC376EF45758245B9CE6</string>
<key>IDESourceControlProjectWCConfigurations</key>
<array>
<dict>
<key>IDESourceControlRepositoryExtensionIdentifierKey</key>
<string>public.vcs.git</string>
<key>IDESourceControlWCCIdentifierKey</key>
<string>51D0BD135080145A51AAFC376EF45758245B9CE6</string>
<key>IDESourceControlWCCName</key>
<string>PullToRefreshCoreText</string>
</dict>
</array>
</dict>
</plist>
================================================
FILE: PullToRefreshCoreText.xcodeproj/xcuserdata/Cem.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
type = "1"
version = "2.0">
</Bucket>
================================================
FILE: PullToRefreshCoreText.xcodeproj/xcuserdata/Cem.xcuserdatad/xcschemes/PullToRefreshCoreText.xcscheme
================================================
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0600"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B29BC27219E4178E00365B69"
BuildableName = "PullToRefreshCoreText.app"
BlueprintName = "PullToRefreshCoreText"
ReferencedContainer = "container:PullToRefreshCoreText.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B29BC28B19E4178E00365B69"
BuildableName = "PullToRefreshCoreTextTests.xctest"
BlueprintName = "PullToRefreshCoreTextTests"
ReferencedContainer = "container:PullToRefreshCoreText.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B29BC28B19E4178E00365B69"
BuildableName = "PullToRefreshCoreTextTests.xctest"
BlueprintName = "PullToRefreshCoreTextTests"
ReferencedContainer = "container:PullToRefreshCoreText.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B29BC27219E4178E00365B69"
BuildableName = "PullToRefreshCoreText.app"
BlueprintName = "PullToRefreshCoreText"
ReferencedContainer = "container:PullToRefreshCoreText.xcodeproj">
</BuildableReference>
</MacroExpansion>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
buildConfiguration = "Debug"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
allowLocationSimulation = "YES">
<BuildableProductRunnable>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B29BC27219E4178E00365B69"
BuildableName = "PullToRefreshCoreText.app"
BlueprintName = "PullToRefreshCoreText"
ReferencedContainer = "container:PullToRefreshCoreText.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
buildConfiguration = "Release"
debugDocumentVersioning = "YES">
<BuildableProductRunnable>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B29BC27219E4178E00365B69"
BuildableName = "PullToRefreshCoreText.app"
BlueprintName = "PullToRefreshCoreText"
ReferencedContainer = "container:PullToRefreshCoreText.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
================================================
FILE: PullToRefreshCoreText.xcodeproj/xcuserdata/Cem.xcuserdatad/xcschemes/xcschememanagement.plist
================================================
<?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>SchemeUserState</key>
<dict>
<key>PullToRefreshCoreText.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>B29BC27219E4178E00365B69</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>B29BC28B19E4178E00365B69</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>
</plist>
================================================
FILE: PullToRefreshCoreTextTests/Info.plist
================================================
<?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>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>com.questa.$(PRODUCT_NAME:rfc1034identifier)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>
================================================
FILE: PullToRefreshCoreTextTests/PullToRefreshCoreTextTests.m
================================================
//
// PullToRefreshCoreTextTests.m
// PullToRefreshCoreTextTests
//
// Created by Cem Olcay on 07/10/14.
// Copyright (c) 2014 questa. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <XCTest/XCTest.h>
@interface PullToRefreshCoreTextTests : XCTestCase
@end
@implementation PullToRefreshCoreTextTests
- (void)setUp {
[super setUp];
// Put setup code here. This method is called before the invocation of each test method in the class.
}
- (void)tearDown {
// Put teardown code here. This method is called after the invocation of each test method in the class.
[super tearDown];
}
- (void)testExample {
// This is an example of a functional test case.
XCTAssert(YES, @"Pass");
}
- (void)testPerformanceExample {
// This is an example of a performance test case.
[self measureBlock:^{
// Put the code you want to measure the time of here.
}];
}
@end
================================================
FILE: README.md
================================================
PullToRefreshCoreText
=====================
PullToRefresh extension for all UIScrollView type classes with animated text drawing style<br>
Demo
----

Install
-------
**Manual**
Copy the files in the folder named PullToRefreshCoreText to your project.
Import the "UIScrollView+PullToRefreshCoreText.h"
**Cocoapods**
```
source 'https://github.com/CocoaPods/Specs.git'
pod 'PullToRefreshCoreText', '~> 0.2'
```
Usage
-----
- (void)addPullToRefreshWithPullText:(NSString *)pullText
pullTextColor:(UIColor *)pullTextColor
pullTextFont:(UIFont *)pullTextFont
refreshingText:(NSString *)refreshingText
refreshingTextColor:(UIColor *)refreshingTextColor
refreshingTextFont:(UIFont *)refreshingTextFont
action:(pullToRefreshAction)action;
It has 2 main texts, pulling and refreshing. <br>
Init function has parameters for creating this texts with its strings, text colors and fonts. <br>
Last parameter is the block function where loading code goes to. <br>
Alternatively I added some other init methods if you want to use same texts or fonts etc. <br>
- (void)addPullToRefreshWithPullText:(NSString *)pullText
action:(pullToRefreshAction)action;
- (void)addPullToRefreshWithPullText:(NSString *)pullText
refreshingText:(NSString *)refreshingText
action:(pullToRefreshAction)action;
- (void)addPullToRefreshWithPullText:(NSString *)pullText
font:(UIFont *)font
action:(pullToRefreshAction)action;
- (void)addPullToRefreshWithPullText:(NSString *)pullText
refreshingText:(NSString *)refreshingText
font:(UIFont *)font
action:(pullToRefreshAction)action;
- (void)addPullToRefreshWithPullText:(NSString *)pullText
pullTextColor:(UIColor *)pullTextColor
refreshingText:(NSString *)refreshingText
refreshingTextColor:(UIColor *)refreshingTextColor
font:(UIFont *)font
action:(pullToRefreshAction)action;
Implementation
--------------
//Create ScrollView
self.scrollView = [[UIScrollView alloc] initWithFrame:self.view.frame];
[self.scrollView setContentSize:CGSizeMake(self.view.frame.size.width, self.scrollView.frame.size.height + 1)];
[self.view addSubview:self.scrollView];
//add pull to refresh
__weak typeof(self) weakSelf = self;
[self.scrollView addPullToRefreshWithPullText:@"Pull To Refresh" pullTextColor:[UIColor blackColor] pullTextFont:DefaultTextFont refreshingText:@"Refreshing" refreshingTextColor:[UIColor blueColor] refreshingTextFont:DefaultTextFont action:^{
[weakSelf loadItems];
}];
One last thing: you should call the `[scrollView finishLoading]` method after the load finishes.<br>
Otherwise you stuck in refreshing state always.
Credits
=======
Blogs and codes I used for creating this<br>
https://github.com/jrturton/NSString-Glyphs<br>
http://www.codeproject.com/Articles/109729/Low-level-text-rendering<br>
http://ronnqvi.st/controlling-animation-timing/<br>
gitextract_kvmoynyz/ ├── LICENSE ├── PullToRefreshCoreText/ │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Base.lproj/ │ │ ├── LaunchScreen.xib │ │ └── Main.storyboard │ ├── Images.xcassets/ │ │ └── AppIcon.appiconset/ │ │ └── Contents.json │ ├── Info.plist │ ├── PullToRefreshCoreText/ │ │ ├── PullToRefreshCoreTextView.h │ │ ├── PullToRefreshCoreTextView.m │ │ ├── UIScrollView+PullToRefreshCoreText.h │ │ └── UIScrollView+PullToRefreshCoreText.m │ ├── TableViewController.h │ ├── TableViewController.m │ ├── ViewController.h │ ├── ViewController.m │ └── main.m ├── PullToRefreshCoreText.podspec ├── PullToRefreshCoreText.xcodeproj/ │ ├── project.pbxproj │ ├── project.xcworkspace/ │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata/ │ │ └── PullToRefreshCoreText.xccheckout │ └── xcuserdata/ │ └── Cem.xcuserdatad/ │ ├── xcdebugger/ │ │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes/ │ ├── PullToRefreshCoreText.xcscheme │ └── xcschememanagement.plist ├── PullToRefreshCoreTextTests/ │ ├── Info.plist │ └── PullToRefreshCoreTextTests.m └── README.md
SYMBOL INDEX (1 symbols across 1 files)
FILE: PullToRefreshCoreText/PullToRefreshCoreText/PullToRefreshCoreTextView.h
type PullToRefreshCoreTextStatusHidden (line 14) | typedef NS_ENUM(NSUInteger, PullToRefreshCoreTextStatus) {
Condensed preview — 26 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (81K chars).
[
{
"path": "LICENSE",
"chars": 1072,
"preview": "Copyright (C) 2014, Cem Olcay \n\nPermission is hereby granted, free of charge, to any person obtaining a \ncopy of this so"
},
{
"path": "PullToRefreshCoreText/AppDelegate.h",
"chars": 287,
"preview": "//\n// AppDelegate.h\n// PullToRefreshCoreText\n//\n// Created by Cem Olcay on 07/10/14.\n// Copyright (c) 2014 questa. A"
},
{
"path": "PullToRefreshCoreText/AppDelegate.m",
"chars": 2041,
"preview": "//\n// AppDelegate.m\n// PullToRefreshCoreText\n//\n// Created by Cem Olcay on 07/10/14.\n// Copyright (c) 2014 questa. A"
},
{
"path": "PullToRefreshCoreText/Base.lproj/LaunchScreen.xib",
"chars": 3712,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.XIB\" versi"
},
{
"path": "PullToRefreshCoreText/Base.lproj/Main.storyboard",
"chars": 5389,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard"
},
{
"path": "PullToRefreshCoreText/Images.xcassets/AppIcon.appiconset/Contents.json",
"chars": 585,
"preview": "{\n \"images\" : [\n {\n \"idiom\" : \"iphone\",\n \"size\" : \"29x29\",\n \"scale\" : \"2x\"\n },\n {\n \"idiom\""
},
{
"path": "PullToRefreshCoreText/Info.plist",
"chars": 1392,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "PullToRefreshCoreText/PullToRefreshCoreText/PullToRefreshCoreTextView.h",
"chars": 1625,
"preview": "//\n// PullToRefreshCoreTextView.h\n// PullToRefreshCoreText\n//\n// Created by Cem Olcay on 14/10/14.\n// Copyright (c) "
},
{
"path": "PullToRefreshCoreText/PullToRefreshCoreText/PullToRefreshCoreTextView.m",
"chars": 8292,
"preview": "//\n// PullToRefreshCoreTextView.m\n// PullToRefreshCoreText\n//\n// Created by Cem Olcay on 14/10/14.\n// Copyright (c) "
},
{
"path": "PullToRefreshCoreText/PullToRefreshCoreText/UIScrollView+PullToRefreshCoreText.h",
"chars": 2074,
"preview": "//\n// UIScrollView+PullToRefreshCoreText.h\n// PullToRefreshCoreText\n//\n// Created by Cem Olcay on 07/10/14.\n// Copyr"
},
{
"path": "PullToRefreshCoreText/PullToRefreshCoreText/UIScrollView+PullToRefreshCoreText.m",
"chars": 4483,
"preview": "//\n// UIScrollView+PullToRefreshCoreText.m\n// PullToRefreshCoreText\n//\n// Created by Cem Olcay on 07/10/14.\n// Copyr"
},
{
"path": "PullToRefreshCoreText/TableViewController.h",
"chars": 237,
"preview": "//\n// TableViewController.h\n// PullToRefreshCoreText\n//\n// Created by Codi Bonney on 12/3/15.\n// Copyright © 2015 qu"
},
{
"path": "PullToRefreshCoreText/TableViewController.m",
"chars": 2663,
"preview": "//\n// TableViewController.m\n// PullToRefreshCoreText\n//\n// Created by Codi Bonney on 12/3/15.\n// Copyright © 2015 qu"
},
{
"path": "PullToRefreshCoreText/ViewController.h",
"chars": 225,
"preview": "//\n// ViewController.h\n// PullToRefreshCoreText\n//\n// Created by Cem Olcay on 07/10/14.\n// Copyright (c) 2014 questa"
},
{
"path": "PullToRefreshCoreText/ViewController.m",
"chars": 2777,
"preview": "//\n// ViewController.m\n// PullToRefreshCoreText\n//\n// Created by Cem Olcay on 07/10/14.\n// Copyright (c) 2014 questa"
},
{
"path": "PullToRefreshCoreText/main.m",
"chars": 344,
"preview": "//\n// main.m\n// PullToRefreshCoreText\n//\n// Created by Cem Olcay on 07/10/14.\n// Copyright (c) 2014 questa. All righ"
},
{
"path": "PullToRefreshCoreText.podspec",
"chars": 4822,
"preview": "#\n# Be sure to run `pod spec lint PullToRefreshCoreText.podspec' to ensure this is a\n# valid spec and to remove all co"
},
{
"path": "PullToRefreshCoreText.xcodeproj/project.pbxproj",
"chars": 19599,
"preview": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 46;\n\tobjects = {\n\n/* Begin PBXBuildFile section *"
},
{
"path": "PullToRefreshCoreText.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
"chars": 166,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n version = \"1.0\">\n <FileRef\n location = \"self:PullToRefreshCo"
},
{
"path": "PullToRefreshCoreText.xcodeproj/project.xcworkspace/xcshareddata/PullToRefreshCoreText.xccheckout",
"chars": 1546,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "PullToRefreshCoreText.xcodeproj/xcuserdata/Cem.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist",
"chars": 91,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Bucket\n type = \"1\"\n version = \"2.0\">\n</Bucket>\n"
},
{
"path": "PullToRefreshCoreText.xcodeproj/xcuserdata/Cem.xcuserdatad/xcschemes/PullToRefreshCoreText.xcscheme",
"chars": 4402,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Scheme\n LastUpgradeVersion = \"0600\"\n version = \"1.3\">\n <BuildAction\n "
},
{
"path": "PullToRefreshCoreText.xcodeproj/xcuserdata/Cem.xcuserdatad/xcschemes/xcschememanagement.plist",
"chars": 583,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "PullToRefreshCoreTextTests/Info.plist",
"chars": 749,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "PullToRefreshCoreTextTests/PullToRefreshCoreTextTests.m",
"chars": 911,
"preview": "//\n// PullToRefreshCoreTextTests.m\n// PullToRefreshCoreTextTests\n//\n// Created by Cem Olcay on 07/10/14.\n// Copyrigh"
},
{
"path": "README.md",
"chars": 3545,
"preview": "PullToRefreshCoreText\n=====================\n\nPullToRefresh extension for all UIScrollView type classes with animated tex"
}
]
About this extraction
This page contains the full source code of the cemolcay/PullToRefreshCoreText GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 26 files (71.9 KB), approximately 21.1k tokens, and a symbol index with 1 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.