LAOMUSIC ARTS
LAOMUSIC ARTS

Reputation: 628

Create a swipe feature within an UIImageView

In my current test app I have a UITabBarController, linked to a UINavigationController that leads to a UIViewController with 6 buttons in it and a second UIViewController with a UIImageView. I've created a segue for each button, wich works.

I want to be able to create a swipe pictures feature inside that UIImageView. The source pictures are inside the app's folder.

Upvotes: 0

Views: 341

Answers (1)

Lorenzo B
Lorenzo B

Reputation: 33428

I'm not sure about your question.

If you need to create a sort of slider of images, you could create a UIViewController with a UIScrollViewas the main view (or as a subview of UIViewController's view).

Once set up, you could create a for-loop where you create UIImageView elements to wrap the image you are loading from your app folder and add each UIImageView to the scroll view.

To make possible to snap photos within the UIScrollView set its property pagingEnabled to YES.

For further info you could take a look at Scrolling sample provided by Apple.

Hope this helps.

Upvotes: 1

Related Questions