grp / pulltorefreshview Goto Github PK
View Code? Open in Web Editor NEWdead simple pull to refresh. you probably shouldn't use this.
License: BSD 2-Clause "Simplified" License
dead simple pull to refresh. you probably shouldn't use this.
License: BSD 2-Clause "Simplified" License
When I use this with UIWebView, statusLabel is not showing.
Adding following code in initWithScrollView fix this issue.
statusLabel.frame = CGRectMake(0.0f, frame.size.height - 50.0f, self.frame.size.width, 20.0f);
version: 5405a50
iPhone 5.1 Simulator
Xcode 4.3.1
I tried to add this to my tableview.
I can see the arrow on top of the tableview, but the arrow isn't rotating or anything. I think it isn't recognizing my tableview as a scrollview. How can i fix that?
Hi,
Would be interesting to put it in a UIWebView.
The latest version (5405a50) doesn't work with UIWebView.
state never be set and pullToRefreshViewShouldRefresh never be triggered.
Adding 'state = kPullToRefreshViewStateNormal;' in initWithScrollView makes this work with UIWebView.
iPhone 5.1 Simulator
Xcode 4.3.1
There is a problem with pulltorefresh when you try to zoom-in the scrollview or other object
example: yfrog.com/klxvvp
I can't release pullView in viewDidUnload. App will CRASH if it receive memory warning.
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
(id)initWithScrollView:(UIScrollView *)scroll {
CGRect frame = CGRectMake(0.0f, 0.0f - scroll.bounds.size.height, scroll.bounds.size.width, scroll.bounds.size.height);
if ((self = [super initWithFrame:frame])) {
//...................
statusLabel = [[UILabel alloc] init];
//add by yager
statusLabel.frame = CGRectMake(0.0f, frame.size.height - 48.0f, self.frame.size.width, 20.0f);
statusLabel.autoresizingMask = UIViewAutoresizingFlexibleWidth;
statusLabel.font = [UIFont systemFontOfSize:12.f];
statusLabel.textColor = kPullToRefreshViewTitleColor;
statusLabel.shadowColor = [UIColor colorWithWhite:0.9f alpha:1.0f];
statusLabel.shadowOffset = CGSizeMake(0.0f, 1.0f);
statusLabel.backgroundColor = [UIColor clearColor];
statusLabel.textAlignment = UITextAlignmentCenter;
[self addSubview:statusLabel];
//...................
//add by yager
[self setState:kPullToRefreshViewStateNormal];
}
return self;
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
I implemented everything into my rss reader, but after bulling the tableview down, the loading window doesn't disappear anymore.
@implementation RssFunViewController
@synthesize rssParser = _rssParser;
@synthesize tableView = _tableView;
@synthesize appDelegate = _appDelegate;
@synthesize toolbar = _toolbar;
-(void)toolbarInit{
UIBarButtonItem *refreshButton = [[UIBarButtonItem alloc]
initWithBarButtonSystemItem:UIBarButtonSystemItemRefresh
target:self action:@selector(reloadRss)];
refreshButton.enabled = NO;
NSArray *items = [NSArray arrayWithObjects: refreshButton, nil];
[self.toolbar setItems:items animated:NO];
[refreshButton release];
}
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
// called when the user pulls-to-refresh
-(void)toggleToolBarButtons:(BOOL)newState{
NSArray *toolbarItems = self.toolbar.items;
for (UIBarButtonItem *item in toolbarItems){
item.enabled = newState;
}
}
//Delegate method for blog parser will get fired when the process is completed
-(void)processHasErrors{
//Might be due to Internet
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Achtung!" message:@"Leider ist es im Moment nicht möglich eine Verbindung zum Internet herzustellen."
delegate:nil cancelButtonTitle:@"OK" otherButtonTitles: nil];
[alert show];
[alert release];
[self toggleToolBarButtons:YES];
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.