Comments (5)
Thanks for your effort @tucan9389 but I decided to just implement my own UIImageView within a standard UIScrollView as the the ImageScrollView was giving me too many issues. Besides this limitation on ContentMode, it doesn't seem to support device rotation properly either. Good luck with future development!
from imagescrollview.
Do you know that it has imageContentMode: ContentMode
property instead of use of contentMode: UIViewContentMode
? There is own ContentMode structure.
(I don't know why use imageContentMode: ContentMode
instead of contentMode: UIViewContentMode
)
from imagescrollview.
I think we should refactoring ImageScrollView
's imageContentMode
to UIScrollView
's contentMode, first.
from imagescrollview.
@tucan9389 yes I am aware of the imageContentMode but it does not have a .center option, which is what I am trying to highlight in my original issue.
from imagescrollview.
How about this approach?
- Add
defaultFit
case atContentMode
- Set
minScale
to1
ifminScale
is bigger than1
insetMaxMinZoomScalesForCurrentBounds()
method.
switch imageContentMode {
case .defaultFit:
minScale = min(xScale, yScale) > 1 ? 1 : min(xScale, yScale)
// ...
}
It works!
If you want implementation code, check my forked repository(ZoomableScrollView).
from imagescrollview.
Related Issues (20)
- Change orientation suggestion HOT 1
- can you support another gesture ? HOT 3
- Image in tableview sometimes shows dragged down
- Using programmatically without storyboard HOT 2
- Problems with iOS 13.3? HOT 5
- Image position is reset after tilt HOT 1
- Landscape Image not centered vertically (iOS 13.3) HOT 3
- How to set Placeholder Image while loading image from SDWebImage ? HOT 1
- Does this library support remote image Urls ? if so how to add multiple remote urls HOT 1
- DidChangeOrientation is fired when notification bar is swiped down HOT 3
- FeatureRequest: zoomed Image as variable HOT 1
- swiftui support? HOT 3
- May I know the purpose of 0.999 technique? HOT 1
- How to hide image , or set image content to nil HOT 3
- Random auto zoom-out issues HOT 5
- Tap Issue
- Get coordinates of the image on long press HOT 1
- my image update every second problem
- Is there a way integrate Kingfisher (or any image loading library) with ImageScrollView
- Image captured shows wrong orientation when open
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 imagescrollview.