Slide up down effect in iOS?

2020-07-27 16:41发布

问题:

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.

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.

回答1:

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.

I would personally go with option 1 and use some UIGestureRecognizer

edit: just like JRG-Developer commented on your question now !