[ScrollView] add defaultZoomScale
See original GitHub issueHi,
ScrollView is missing a defaultZoomScale
that would allow to define the initial zoom scale.
The current zoomScale
prop is controlled and flickers a lot. In my use-case, I just want to be able to define the initial zoom scale, not to control it.
I’ve also attempted to do this in componentDidMount
:
this.refs.myScrollView.setNativeProps({
zoomScale: 3
});
but this create inconsistency issue on the scrollview: I can basically zoom out of the bounds (it totally breaks the scrollview)
Thanks
Issue Analytics
- State:
- Created 8 years ago
- Reactions:3
- Comments:6 (4 by maintainers)
Top Results From Across the Web
How do I reset after a UIScrollView zoom? - Stack Overflow
I was just looking to reset on load to default zoom scale, because when I ... When you create the scroll view, you...
Read more >How to properly zoom into a picture using scroll view without ...
I figured it out, first bound the imageview in storyboard to the 4 edges of scrollview with 0 spacing, then add a constraint...
Read more >Image crop view in iOS. A step by step tutorial to create an…
Here's how it will look like at the end : Then add a UIScrollView and a crop button to ... then finally zoom...
Read more >How to support pinch to zoom in a UIScrollView
Making a scroll view zoom when you pinch is a multi-step approach, and you need to ... then add the viewForZooming(in:) method, like...
Read more >PSPDFDocumentViewLayout Class | API Reference - PSPDFKit
A document view layout controls how a document is visualized on screen. It controls where a spread (a set of pages) is placed...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I think being able to define the default zoom would be a much more elegant way of doing this. Calling scrollResponderZoomTo method requires measuring the component, actually calling the method somewhere like componentDidMount and calculating the width and height for the scale that you need. People will inevitably lean towards setting the zoomScale property to accomplish this.
Any updates on this?