ios像这样滚动
我正处于项目的代码设计阶段,我不确定这种滚动自定义项的样式是否可以在没有一些自定义代码的情况下使用,因此我通过 SOF 运行它来找出答案。
-----------------------------
|A B C|
|--+ +-----------+ +--|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
|--+ +-----------+ +--|
| |
-----------------------------
根据我的开发人员图表,您可以想象一个带有 pagingEnabled
的 UIScrollView
。我的问题是,当某个项目占据中心位置时,UIScrollView
是否允许我显示相邻项目的边缘?
提前致谢!
I'm in the code design phase of a project and I am not sure if this style of scrolling custom items is available without a bit of custom code, so I'm running it by SOF to find out.
-----------------------------
|A B C|
|--+ +-----------+ +--|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
|--+ +-----------+ +--|
| |
-----------------------------
Per my developer graphics, you can invision a UIScrollView
with pagingEnabled
. My questions is, will the UIScrollView
allow me to show the edges of neighboring items when an item has claimed the center position?
Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这个问题已经出现过好几次了;我自己从未实现过这一点,但大多数答案似乎都涉及结合一些内容:
clipsToBounds
属性设置为NO
,这样它将显示其他页面。UIView
上的方法来劫持正常方法路由触及视图。滚动视图应该位于此自定义视图的内部或后面。编辑:这是教程 描述了你所追求的。
This question has popped up several times; I've never implemented this myself, but most of the answers seem to involve combining a few things:
clipsToBounds
property set toNO
, so it will show the other pages.UIView
to hijack the normal method of routing touches to views. The scroll view should be inside or behind this custom view.Edit: Here's a tutorial that describes what you're after.