r-plus / aapulltorefresh Goto Github PK
View Code? Open in Web Editor NEWAll around pull to refresh library.
License: Other
All around pull to refresh library.
License: Other
Fix a bug about mulit Obsever
- (void)willMoveToSuperview:(UIView *)newSuperview {
if (self.superview && newSuperview == nil) {\n
UIScrollView *scrollView = (UIScrollView *)self.superview;
if (self.showPullToRefresh) {
if (self.isObserving) {
[scrollView removeObserver:self forKeyPath:@"contentOffset"];
[scrollView removeObserver:self forKeyPath:@"contentSize"];
[scrollView removeObserver:self forKeyPath:@"frame"];
self.isObserving = NO;
}
}
}
}
when you implement more than one swipe driectin diagonal looks crazy ass.
to get only swipe left OR down OR right i was able to fix a few things. headcache included.
can i start a pull reqest with it?
AAPullToRefresh support collectionview?
I have a navigation controller based application. At the first view there exist a button who push another ViewController or TableViewController to the navigation controller stack. This ViewController / TableViewController use the AAPullToRefresh. If I go back to the main root controller, I get the follow error message:
"An instance 0x99fca00 of class UITableView was deallocated while key value observers were still registered with it. Observation info was leaked, and may even become mistakenly attached to some other object. Set a breakpoint on NSKVODeallocateBreak to stop here in the debugger. Here's the current observation info:
<NSKeyValueObservationInfo 0x8ba4790> (
<NSKeyValueObservance 0x8bcffe0: Observer: 0x8bcc2d0, Key path: contentOffset, Options: <New: YES, Old: NO, Prior: NO> Context: 0x0, Property: 0x8cd3d80>
<NSKeyValueObservance 0x8bd0040: Observer: 0x8bcc2d0, Key path: contentSize, Options: <New: YES, Old: NO, Prior: NO> Context: 0x0, Property: 0x8cd5970>
<NSKeyValueObservance 0x8bd00e0: Observer: 0x8bcc2d0, Key path: frame, Options: <New: YES, Old: NO, Prior: NO> Context: 0x0, Property: 0x8cd5fc0>
)"
If I need a ViewController with ScrollView it's the same. Only the word "UITableView" replaced by "UIScrollView". The message replicate with every new push of the controller. What can I do?
Tried it with an ios7 translucent navigation bar and it seams, the refresh header resets the scroll view insets to 0,0.
edit: it works very well when the scroll view insets are set on the table view, but if you use something like "automaticallyadjustscrollviewinsets" it won't work. maybe the system doesn't report the correct inset then.
I put the controller in a collection view while pulled it from right to left.
And I put the dealloc for just checking it but it never gets called in ARC.
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.