evgenyneu / ios-imagescroll-swift Goto Github PK
View Code? Open in Web Editor NEWiOS demo of using image view inside a scroll view with auto layout in Swift
iOS demo of using image view inside a scroll view with auto layout in Swift
If you don't mind,can you push image array that include multiple images in uiscrollview with Page Control.I m struck at this.
Thanks you.really love to learn your scrollview.Please help
Title
Thanks for the nice example of image zooming with auto layout.
I want to retain the zoom level on orientation change. please help me to achieve this.
It seems to work on iPad when its horisontal, but not i portrait mode :-(
Thanks for the awesome example. It works awesome for me. One thing i noticed though is the fact that when you try to make your current project compatible with this example you have to set the Intrinsic Size property of the UIImageView in the Storyboard to Placeholder. Maybe something worth mentioning in the ReadMe file.
Thanks again for making this example public
First off thanks for this example code. It's the most concise and best solution I've seen for getting zooming to work consistently with auto layout. I really appreciate.
So, I'm probably just missing something simple, but when I pinch in and release, the image view just snaps back to its starting position. I thought this was controlled by changing the minimum zoom scale, but when I mess with that in updateZoom(), it doesn't work the way I expect.
In other words, how can I make the example zoom out as well as in?
Thanks again.
I tried to reproduce your setup in my existing project.
I had a problem with two of the layout constraints, namely:
In the first case, the constraint's "First Item" is set to "Scroll View.Top". If I click the drop-down menu, all options (including the selected "top") are grayed out:
(see the tooltip warning).
Similarly, "Second Item" is set to "Top Layout Guide.Top". If I click the menu, all the options except "Bottom" (including the selected one, "Top") are grayed out:
(Something exactly analogous happens for the second constraint listed above)
The only way I found to reproduce your constraints was to enter them directly as XML in the storybpard's source code. Of course I had to change the IDs of the items involved in each constraint to match those of the view and scroll view of my storyboard (which is a total pain).
(Ideally, I would have just copy/pasted your demo project's storyboard as-is, but the existing view controller where I wanted to implement scrolling was already setup with lots of other outlets.)
Perhaps there's an alternative (but legal) set of constraints that enables the same functionality?
(I'm no autolayout expert )
Thankfully, I got panning and zooming of the image view to work.
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.