iOS中的上滑效果? [英] Slide up down effect in iOS?
问题描述
在我的 iOS 应用程序中,我必须像附加图像一样设计屏幕.
In my iOS app i've to design screen like attached image.
当我点击解释"部分中的-"或+"按钮时,它会显示/隐藏解释"部分.
when i click on '-' or '+' button in Explanation section it show/hide Explanation section.
默认情况下,所有说明部分都将隐藏(如图像底部所示),如果我单击+"按钮,它将展开视图,按钮变为-",反之亦然.我在 google 上没有发现 ant 有用(可能是我在用关键字搜索!)任何建议或示例代码将不胜感激.谢谢.
by default all explanation sections will be hidden(as shown in bottom of image), if i click '+' button it will expand the view and button become '-' and vice versa. I didn't find ant useful on google(may be i'm searching by wring keywords!) Any suggestion or sample code will be appreciated. Thanks.
推荐答案
一个解决方案可能是一个带有自定义 UITableViewCells
(改变高度等)的 UITableView
,其他的将是 插入/删除行 或使用像 苹果示例代码.
One solution could be a UITableView
with custom UITableViewCells
(that change height, etc.), others would be inserting/deleting rows or using expandable sections like in apples sample code.
我个人会选择选项 1 并使用一些 UIGestureRecognizer
I would personally go with option 1 and use some UIGestureRecognizer
就像JRG-Developer现在评论您的问题一样!
edit: just like JRG-Developer commented on your question now !
这篇关于iOS中的上滑效果?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!