iOS揭示tableview标头图片(视差效果)
我正试图设置一个较大的图像,以便在将表视图进一步拉低时显示更多信息..我知道我没有任何意义,显示
I'm trying to set a large image that reveal more as the table view pulled further down,.. I know I'm not making any sense, it's easier to show an example I recorded from netbot.
请让我知道合适的用词,然后我将更新标题. (更新:显然称为视差效果)
Please let me know what the proper term for that and I'll update the title. (Update: apparently it's called parallax effect)
我尝试将UIImageView
设置为self.tableView.backgroundView
并为第一部分添加透明标题.但是感觉却不一样.它从图像的顶部而不是中心显示出来,并在iPad人像和iPhone风景上被拉伸和挤压(我已经尝试了所有contentMode
).
I've tried setting UIImageView
to self.tableView.backgroundView
and add transparent header for the first section. But it doesn't have the same feeling. it reveals from the top of the image instead of center, it's stretched and squashed on iPad portrait and iPhone landscape (I've tried all contentMode
).
我还尝试将UIImageView
设置为tableView标头.启用clipsToBounds
确实会显示图像的中央部分,但是我无法让它更多地显示图像.
I also have tried setting UIImageView
to the tableView header. Enabling clipsToBounds
does show the center part of the image, but I can't get it to reveal more of the image.
一个名为我的艺术家的应用也具有此功能,但他们不会反弹.那么,您知道Tapbots的才华横溢的开发人员如何实现这一目标吗?
An app called My Artists also has this, but theirs don't bounce back. So, any idea how the brilliant devs at Tapbots approach this?
这很奇怪.我很确定我已经接受了这个问题的答案.无论如何,答案是 ZGExpandZoomView
This is weird. I'm pretty sure I've accepted an answer to this question. Anyway, the answer is ZGExpandZoomView