-1

I want to build a similar view as seen in the iOS Camera app, but I don't know which UI-Elements were used.

It can be found in the Instagram Story section as well.

enter image description here

enter image description here

Edit:

It should have the same behavior. I tried to accomplish this with an UICollectionView. I'm adding UIButtons to the view but I don't know how to make the 'drag & stop' behavior. Maybe there is a delegate method or so. A small explanation or some ideas would be helpful. I don't need code.

user3653164
  • 979
  • 1
  • 8
  • 24
  • This site is not designed to write code for people but to answer specific questions. So what have you tried? Show us some code you have implemented. – Upholder Of Truth Jan 13 '18 at 23:25
  • Added more information in the Edit part. – user3653164 Jan 13 '18 at 23:31
  • So this is a view with a collection of buttons that you can swipe left and right and also tap on one of the visible ones to go directly to it. Is it just the dynamics of that you are after or the look of it as well? – Upholder Of Truth Jan 13 '18 at 23:38
  • A UICollectionView is probably not the best way to do this. You could just create a UIScrollView with a load of buttons on it and disable automatic scrolling and then use a UISwipeGestureRecognizer to handle the swiping and change the contentOffset. Alternatively you could just create a standard UIView with a load of buttons on it and a UISwipeGestureRecognizer and change it's frame in the superview. There you go question answered without any code. Not that helpful really but that is why questions should be more specific in nature. – Upholder Of Truth Jan 13 '18 at 23:47
  • Looking to do something similar. Did you ever code this out successfully? – May Yang Feb 18 '22 at 05:02

1 Answers1

0

That's a custom control. You could create it using a horizontal scroll view containing multiple UILabel objects, each of which has an attached UITapGestureRecognizer.

You might be able to find a third party library that does what you want. Try Cocoa Controls.

Dharman
  • 30,962
  • 25
  • 85
  • 135
Duncan C
  • 128,072
  • 22
  • 173
  • 272