Josue Espinosa
Josue Espinosa

Reputation: 5089

"pull up" animation on drag

I am trying to achieve an effect where a user drags on a tab and it reveals a toolbar underneath what you dragged. It is similar to the pandora app linked. On the Pandora app, next to the thumbs up, there is a tab. When you drag it up, it shows a volume bar underneath. I tried detecting gestures on the "tab" to animate it moving upwards, but failed miserably. Is there a better way of achieving the drag-to-reveal effect?

http://www.theiospost.com/storage/Pandora-4.0-iPhone5-2.png?__SQUARESPACE_CACHEVERSION=1351551597464

Upvotes: 1

Views: 617

Answers (1)

paulrehkugler
paulrehkugler

Reputation: 3271

There's no better way to create a "drag-to-reveal" effect; UIPanGestureRecognizer is your best option.

See this SO answer for guidance on moving UIViews with a UIPanGestureRecognizer.

Upvotes: 2

Related Questions