raistlin
raistlin

Reputation: 4346

How to create 'home screen apps folder'-like button programmatically on iOS?

I need to achieve something like a folder view in Springboard, when you press the folder button and home screen content is sliding nicely to show you what's inside selected folder.

My question: is it possible? I mean I can think now only of one solution, just 'simply' making whole animation by myself with revealing subviews, sliding them and whole going back operations.
Is it the only way or is there anything easier?
note: I got my app set to iOS 5.0 +
best regards
Filip

Upvotes: 1

Views: 783

Answers (2)

Ashley Mills
Ashley Mills

Reputation: 53121

There's nothing "built in" to the SDK that will achieve what you're trying to do, so you'll have to build it yourself.

It shouldn't be too big an ask. Fairly simply:

  • Add a UIButton for each folder to your "Springboard" view controller's view.
  • User taps a button and you animate in UIView subview that displays the folders contents.
  • Again, each member of the folder's contents could be represented by a UIButton.
  • Tapping on a content button pushes a new view controller on the nav stack (say)
  • Add a tap gesture recogniser to the main view, so tapping outside the open folder will close it.

This sounds like a great programming challenge to me!

Upvotes: 3

Omar Abdelhafith
Omar Abdelhafith

Reputation: 21221

Yes i think you would need to do it as a custom view, adding custom animations

Upvotes: 1

Related Questions