Comments (6)
Max,
Hi and Thanks.
Another need / vote to enable programmatic scrolling.
Neil
from mxparallaxheader.
As a workaround I'm calling scrollView:setContentOffset: since it disables KVO in MXScrollView while you change it.
[self.scrollView scrollView:scrollView setContentOffset:CGPointMake(0, -self.scrollView.contentInset.top)];
Of course I had to expose it in a category.
@interface MXScrollView ()
- (void) scrollView:(UIScrollView*)scrollView setContentOffset:(CGPoint)offset;
@end
from mxparallaxheader.
Hi @andiradulescu
Yes the contentoffset is locked by KVO, I will try to find a fix.
from mxparallaxheader.
Hi @maxep! Thanks!
I would've tried to find a fix myself (instead of the workaround), but I'm not sure what is the correct approach.
from mxparallaxheader.
[self.scrollView scrollView:scrollView setContentOffset:CGPointMake(0, -self.scrollView.contentInset.top)];
Where did you put this code ?
from mxparallaxheader.
@andiradulescu @rahulvyas @nweintraut @maxep @loicgardiol
Hi, I have forked this library into swift version called HPParallaxHeader: https://github.com/ngochiencse/HPParallaxHeader
If you need to perform tap on status bar to scroll to top, HPParallaxHeader automatically handle for you.
If you need to scroll to top programatically, I have created this method for you:
/**
Scroll to top manually which show parallax header totally
*/
open func hpScrollsToTop(animated: Bool)
from mxparallaxheader.
Related Issues (20)
- Implementation interferes with navbar customization HOT 1
- Items duplicates when added second time HOT 2
- maximumHeight added would be better HOT 1
- MXScrollView cancelled child parallaxHeader-UIScrollView touches HOT 1
- Apple will stop accepting submissions of apps that use UIWebView APIs HOT 2
- How can I set header view height & minimum height with programmatically HOT 3
- I am getting progress value greater than 1.0 initially. HOT 1
- MXScrollView crashes app HOT 21
- parallaxHeader.view not filling superview. HOT 1
- Weird width on MXParallaxHeader 1.1.0 HOT 13
- MXParallaxHeader Scroll issue inside UITableviewHeader HOT 1
- Swift Package Manager support HOT 1
- Keyboard appearance HOT 3
- Animating header height change HOT 1
- The bottom of view in Scrollview is not fully displayed. HOT 2
- Empty space at the bottom of MXScrollViewController HOT 1
- SwiftPackage manager issue HOT 1
- This project is no longer maintained HOT 4
- collectionView.parallaxHeader is nil HOT 1
- Alternative Library HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mxparallaxheader.