简体   繁体   English

如何在iOS中创建“扩展”菜单?

[英]How to create an “expanding” menu in iOS?

I need to have a menu options on my application, but the various options i have for my application are too many to fit in a screen. 我的应用程序上需要有一个菜单选项,但是我的应用程序所具有的各种选项太多,无法容纳在屏幕上。

What i find delicate, is what i have seen in various applications where the options are like expanding buttons, that reveal more settings when pressed. 我发现的微妙之处在于,我在各种应用程序中所看到的选项如扩展按钮一样,它们在按下时会显示更多设置。

I am attaching a picture of an "expanding" menu, before and after clicked. 我在单击之前和之后都附有“展开”菜单的图片。

在此处输入图片说明

在此处输入图片说明

As you see the options like this look much more delicate. 如您所见,这样的选项看起来更加精致。
Does anyone have any idea how i can implement something like that in my app? 有谁知道我如何在我的应用程序中实现类似的东西?
Is it something completely customized ? 是完全定制的东西吗?
Is there a tutorial you are aware of , on how to succeed on such an effect? 您是否知道有关如何成功实现这种效果的教程?

您可以在此处此处通过一些很好的示例来满足自己的要求,当然需要进行一些修改。

Try this https://github.com/mrdepth/tools/tree/master/CollapsableTableView 试试这个https://github.com/mrdepth/tools/tree/master/CollapsableTableView

You can use this control to show and hide menu. 您可以使用此控件显示和隐藏菜单。

我建议使用TableView,每个单元格都将具有设置选项,并在单击该单元格时添加和删除带有动画的行;)或创建不同的视图并最初将其隐藏,然后在点击任何设置按钮时只需添加这些视图并打开动画并设置框架。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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