简体   繁体   中英

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

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!

是的我认为您需要将其作为自定义视图添加,添加自定义动画

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM