Sliding drawer equivalent in iOS
Asked Answered
A

2

6

After wasting lot of time searching, I am finally posting this question, hoping I get an answer.

I want to have a widget in iOS, which has the similar functionality of Sliding Drawer in Android. (Like the bar at the bottom, and on pulling it, it shows up a new view).

Any help would be greatly appreciated.

Thanks

Arita answered 1/8, 2012 at 6:14 Comment(2)
I've been working on an interesting solution to this. It's a floating style navigation drawer. You can find it on GitHub.Gervase
I did a google search on "iOS slide-out drawer library" and found 3 or 4 right off the bat. You might try using somebody else's pre-built library, or you could write your own using a custom UIView and a pan gesture recognizer. That's what I did for my company's app, FaceDancer.Turbosupercharger
E
3

A few similar questions that might help you out:

Making a pull out tray - (iOS)

iOS: Sliding UIView on/off screen

Esparto answered 1/8, 2012 at 6:20 Comment(0)
D
0

I recently made a drawer container controller and put it up on Github: https://github.com/saldavonschwartz/DrawerContainerController

While not exactly the same (you are asking about a vertical single view sliding up/down), you might want to download the code and take a look. My approach might as well work for what you are trying to do: basically, creating a container controller which can host another controller and its view and present its view in a custom way.

Specifically, you might want to look at:

  • -replaceContainedController:forIdentifier: for how you would go about adding child view controllers the 'Apple' way.
  • -didPanContent: and -translateContentContainerViewToPosition:animated:completion: for the sliding animation from input of a UIPanGestureRecognizer
Distort answered 19/8, 2013 at 8:3 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.