Is it possible to swipe between images in Swift iOS?

Swift ios is it possible to swipe between images using UIImageView

  • First off, I am new to swift / ios. In my viewcontroller I have a UIImageView, in that I load in an URL form an extrenal API in order to show an image. What I want to do now is to to be able to swipe between image(s), so I dont want a pageviewcontroller. Is this possible to do with a UIImageView? If so please share any example / github library, it would help alot. Thanks in advance,

  • Answer:

    No, you can't really swipe between images using an image view. You could, however, put an image view inside another view and swipe/pan to slide between images. That is a fair amount of work to implement. You should not be so quick to reject UIPageViewController. It has a slide style as an alternative to the page curl style. It handles what you want to do beautifully. Setting up a page view controller is a lot like setting up a table view or a collection view. Do a search in the Xcode help system on "PhotoScroller". That will point you to a demo app that provides a UI for scrolling through a series of images. It handles tiling of large images so it's more than you need, but it serves as an example of the UI I think you are after.

user2722667 at Stack Overflow Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.