ios 中的简单手风琴菜单
我想在 ios 中开发一个简单的手风琴菜单,但我找不到我想要的示例。 手风琴菜单标题包含图像(箭头)和文本。单击此文本,其内容将可见。如果再次单击,则必须将其关闭。
例如:
>> Title1
>> Title2
>> Title3
如果单击 Title1,它将展开。
<< Title1
Including text information...
>> Title2
>> Title3
如何制作最简单的方法? 谢谢您的建议。
I want to develop a simple accordion menu in ios but I could not find an example of the way I want.
Accordion menu headers to include an image(arrow) and text. Clicking on this text its content will be visible. If clicked again it must be closed.
For example:
>> Title1
>> Title2
>> Title3
If click Title1 it expands.
<< Title1
Including text information...
>> Title2
>> Title3
How to make the easiest way?
Thank you for your advice.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您需要的是一个 UITableView,它具有行选择委托方法上的函数来操作基础数据并添加行并使用从顶部滑入单元格的单元格动画重新渲染。
这是 Cocoanetics 的教程。
What you're after is a UITableView, with functions on the row selection delegate methods to manipulate the underlying data and add rows and re-render with the cell animation that slides the cells in from the top.
Here's a tutorial from Cocoanetics.
我相信您正在寻找弹出窗口视图,尽管这些视图仅在 iPad 上可用。否则,iPhone 模态视图的某些变体可能会满足您的需求。
http://www.raywenderlich.com/1056/ipad -for-iphone-developers-101-uipopovercontroller-tutorial
http://developer.apple.com/库/IOS/#documentation/UIKit/Reference/UIPopoverController_class/Reference/Reference.html
I believe you are looking for a popover view, though those are only available on iPad. Otherwise some variation of a modal view for iPhone might suit your needs.
http://www.raywenderlich.com/1056/ipad-for-iphone-developers-101-uipopovercontroller-tutorial
http://developer.apple.com/library/IOS/#documentation/UIKit/Reference/UIPopoverController_class/Reference/Reference.html