Skip to content

Commit

Permalink
removed pull to refresh effect.
Browse files Browse the repository at this point in the history
  • Loading branch information
ashchan committed Mar 9, 2012
1 parent 8cf971b commit 24066b7
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 79 deletions.
1 change: 0 additions & 1 deletion Rakefile
Expand Up @@ -12,7 +12,6 @@ task :install do
[
["https://github.com/kgn/DBPrefsWindowController.git", "master"],
["https://github.com/RestKit/RestKit.git", "development"],
["https://github.com/vincentmac/PullToRefresh.git", "master"]
].each do |lib|
`git clone #{lib[0]} -b #{lib[1]} --recursive`
end
Expand Down
31 changes: 0 additions & 31 deletions RubyChinaReader.xcodeproj/project.pbxproj
Expand Up @@ -35,10 +35,6 @@
1A9488271506EBE2004B83CA /* RCRUserDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A9488251506EBE2004B83CA /* RCRUserDetailViewController.m */; };
1A9488281506EBE2004B83CA /* RCRUserDetailViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1A9488261506EBE2004B83CA /* RCRUserDetailViewController.xib */; };
1AB1A92215076862008D287B /* ruby-china-gray.png in Resources */ = {isa = PBXBuildFile; fileRef = 1AB1A92115076862008D287B /* ruby-china-gray.png */; };
1AB3321B1503769C000D9DEA /* pull-to-refresh-arrow.png in Resources */ = {isa = PBXBuildFile; fileRef = 1AB3320C1503769C000D9DEA /* pull-to-refresh-arrow.png */; };
1AB3321D1503769C000D9DEA /* PullToRefreshClipView.m in Sources */ = {isa = PBXBuildFile; fileRef = 1AB332101503769C000D9DEA /* PullToRefreshClipView.m */; };
1AB3321E1503769C000D9DEA /* PullToRefreshScrollView.m in Sources */ = {isa = PBXBuildFile; fileRef = 1AB332131503769C000D9DEA /* PullToRefreshScrollView.m */; };
1AB3321F1503769C000D9DEA /* release-to-refresh.png in Resources */ = {isa = PBXBuildFile; fileRef = 1AB332141503769C000D9DEA /* release-to-refresh.png */; };
1AB3322115037734000D9DEA /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AB3322015037734000D9DEA /* QuartzCore.framework */; };
1AB3323315039034000D9DEA /* RestKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A6AB5411502037C00CC0516 /* RestKit.framework */; };
1AB3323A150393C8000D9DEA /* RestKit.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 1A6AB5411502037C00CC0516 /* RestKit.framework */; };
Expand Down Expand Up @@ -156,13 +152,6 @@
1A9488251506EBE2004B83CA /* RCRUserDetailViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCRUserDetailViewController.m; sourceTree = "<group>"; };
1A9488261506EBE2004B83CA /* RCRUserDetailViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = RCRUserDetailViewController.xib; sourceTree = "<group>"; };
1AB1A92115076862008D287B /* ruby-china-gray.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "ruby-china-gray.png"; path = "Resources/ruby-china-gray.png"; sourceTree = "<group>"; };
1AB3320C1503769C000D9DEA /* pull-to-refresh-arrow.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "pull-to-refresh-arrow.png"; sourceTree = "<group>"; };
1AB3320F1503769C000D9DEA /* PullToRefreshClipView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PullToRefreshClipView.h; sourceTree = "<group>"; };
1AB332101503769C000D9DEA /* PullToRefreshClipView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PullToRefreshClipView.m; sourceTree = "<group>"; };
1AB332111503769C000D9DEA /* PullToRefreshDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PullToRefreshDelegate.h; sourceTree = "<group>"; };
1AB332121503769C000D9DEA /* PullToRefreshScrollView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PullToRefreshScrollView.h; sourceTree = "<group>"; };
1AB332131503769C000D9DEA /* PullToRefreshScrollView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PullToRefreshScrollView.m; sourceTree = "<group>"; };
1AB332141503769C000D9DEA /* release-to-refresh.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "release-to-refresh.png"; sourceTree = "<group>"; };
1AB3322015037734000D9DEA /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
1AFC257B14FCDF1100443426 /* RubyChinaReader.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RubyChinaReader.app; sourceTree = BUILT_PRODUCTS_DIR; };
1AFC257F14FCDF1100443426 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
Expand Down Expand Up @@ -262,7 +251,6 @@
1A6EC9AE14FD0BE700A91FEF /* SharedLib */ = {
isa = PBXGroup;
children = (
1AB332001503769C000D9DEA /* PullToRefresh */,
1A6AB5321502037C00CC0516 /* RestKit.xcodeproj */,
1A6ECA3F14FD0C3300A91FEF /* DBPrefsWindowController */,
);
Expand Down Expand Up @@ -329,21 +317,6 @@
name = Resources;
sourceTree = "<group>";
};
1AB332001503769C000D9DEA /* PullToRefresh */ = {
isa = PBXGroup;
children = (
1AB3320C1503769C000D9DEA /* pull-to-refresh-arrow.png */,
1AB332141503769C000D9DEA /* release-to-refresh.png */,
1AB3320F1503769C000D9DEA /* PullToRefreshClipView.h */,
1AB332101503769C000D9DEA /* PullToRefreshClipView.m */,
1AB332111503769C000D9DEA /* PullToRefreshDelegate.h */,
1AB332121503769C000D9DEA /* PullToRefreshScrollView.h */,
1AB332131503769C000D9DEA /* PullToRefreshScrollView.m */,
);
name = PullToRefresh;
path = SharedLib/PullToRefresh/PullToRefresh;
sourceTree = SOURCE_ROOT;
};
1AFC257014FCDF1100443426 = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -550,8 +523,6 @@
1A6AB56115022D5F00CC0516 /* RCRInfoViewController.xib in Resources */,
1A6AB5661502307800CC0516 /* RCROptionsViewController.xib in Resources */,
1A6AB56B1502318100CC0516 /* RCRAccountViewController.xib in Resources */,
1AB3321B1503769C000D9DEA /* pull-to-refresh-arrow.png in Resources */,
1AB3321F1503769C000D9DEA /* release-to-refresh.png in Resources */,
1A4FA721150618A200FB6B8D /* Credits.html in Resources */,
1A9488281506EBE2004B83CA /* RCRUserDetailViewController.xib in Resources */,
1AB1A92215076862008D287B /* ruby-china-gray.png in Resources */,
Expand Down Expand Up @@ -602,8 +573,6 @@
1A1FC5C81503184E009CDD67 /* RCRTopic.m in Sources */,
1A1FC5CB15032C26009CDD67 /* RCRTableRowView.m in Sources */,
1A1FC5CE15033875009CDD67 /* RCRUser.m in Sources */,
1AB3321D1503769C000D9DEA /* PullToRefreshClipView.m in Sources */,
1AB3321E1503769C000D9DEA /* PullToRefreshScrollView.m in Sources */,
1A9488271506EBE2004B83CA /* RCRUserDetailViewController.m in Sources */,
9612CE5A1507806700380187 /* NSDate+TimeAgo.m in Sources */,
1A6546B1150789F40030C113 /* RCRTopicDetailController.m in Sources */,
Expand Down
2 changes: 0 additions & 2 deletions RubyChinaReader/RCRTopicsViewController.h
Expand Up @@ -8,12 +8,10 @@

#import <RestKit/RestKit.h>
#import "NSDate+TimeAgo.h"
#import "PullToRefreshScrollView.h"

@interface RCRTopicsViewController : NSViewController <RKObjectLoaderDelegate, NSTableViewDelegate, NSTableViewDataSource>

@property (weak) IBOutlet NSTableView *topicsTableView;
@property (weak) IBOutlet PullToRefreshScrollView *scrollView;
@property (weak) IBOutlet NSProgressIndicator *loading;

- (void)start;
Expand Down
21 changes: 0 additions & 21 deletions RubyChinaReader/RCRTopicsViewController.m
Expand Up @@ -7,31 +7,15 @@
//

#import "RCRTopicsViewController.h"
#import "PullToRefreshDelegate.h"
#import "RCRTableRowView.h"
#import "RCRTopicCellView.h"
#import "RCRTopic.h"
#import "RCRUserDetailViewController.h"
#import "RCRUrlBuilder.h"

@interface RCRPullToRefreshDelegate : NSObject<PullToRefreshDelegate>
@property (assign) RCRTopicsViewController *vc;
@end

@implementation RCRPullToRefreshDelegate

@synthesize vc;

- (void)ptrScrollViewDidTriggerRefresh:(id)sender {
[vc refresh];
}

@end

@interface RCRTopicsViewController () {
NSArray *_topics;
NSMutableArray *_observedVisibleItems;
RCRPullToRefreshDelegate *_pullToRefreshDelegate;
NSPopover *_userPopover;
RCRUserDetailViewController *_userDetailViewController;
}
Expand All @@ -46,7 +30,6 @@ - (void)closeUserPopover;
@implementation RCRTopicsViewController

@synthesize topicsTableView;
@synthesize scrollView;
@synthesize loading;

- (NSString *)nibName {
Expand All @@ -71,10 +54,6 @@ - (void)start {
// force load nib
[_userDetailViewController view];

_pullToRefreshDelegate = [[RCRPullToRefreshDelegate alloc] init];
_pullToRefreshDelegate.vc = self;
scrollView.delegate = _pullToRefreshDelegate;

topicsTableView.hidden = YES;
topicsTableView.target = self;
topicsTableView.doubleAction = @selector(topicRowClicked:);
Expand Down
26 changes: 2 additions & 24 deletions RubyChinaReader/RCRTopicsViewController.xib
Expand Up @@ -3,12 +3,12 @@
<data>
<int key="IBDocument.SystemTarget">1070</int>
<string key="IBDocument.SystemVersion">11D50</string>
<string key="IBDocument.InterfaceBuilderVersion">2177</string>
<string key="IBDocument.InterfaceBuilderVersion">2182</string>
<string key="IBDocument.AppKitVersion">1138.32</string>
<string key="IBDocument.HIToolboxVersion">568.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="NS.object.0">2177</string>
<string key="NS.object.0">2182</string>
</object>
<array key="IBDocument.IntegratedClassDependencies">
<string>NSScroller</string>
Expand Down Expand Up @@ -277,14 +277,6 @@
</object>
<int key="connectionID">199</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">scrollView</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="515144670"/>
</object>
<int key="connectionID">484</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">userImageClicked:</string>
Expand Down Expand Up @@ -1680,7 +1672,6 @@
<string key="1720.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="1723.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="1724.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="32.CustomClassName">PullToRefreshScrollView</string>
<boolean value="NO" key="32.IBNSViewMetadataTranslatesAutoresizingMaskIntoConstraints"/>
<string key="32.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="33.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
Expand Down Expand Up @@ -1784,14 +1775,6 @@
<string key="minorKey">./Classes/NSLayoutConstraint.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">PullToRefreshScrollView</string>
<string key="superclassName">NSScrollView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/PullToRefreshScrollView.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">RCRTopicCellView</string>
<string key="superclassName">NSTableCellView</string>
Expand Down Expand Up @@ -1853,18 +1836,13 @@
</dictionary>
<dictionary class="NSMutableDictionary" key="outlets">
<string key="loading">NSProgressIndicator</string>
<string key="scrollView">PullToRefreshScrollView</string>
<string key="topicsTableView">NSTableView</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
<object class="IBToOneOutletInfo" key="loading">
<string key="name">loading</string>
<string key="candidateClassName">NSProgressIndicator</string>
</object>
<object class="IBToOneOutletInfo" key="scrollView">
<string key="name">scrollView</string>
<string key="candidateClassName">PullToRefreshScrollView</string>
</object>
<object class="IBToOneOutletInfo" key="topicsTableView">
<string key="name">topicsTableView</string>
<string key="candidateClassName">NSTableView</string>
Expand Down

0 comments on commit 24066b7

Please sign in to comment.