[英]iOS home screen swipe functionality
On the home screen of an iOS device, let's say you have 3 "pages" of icons. 在iOS设备的主屏幕上 ,假设您有3个“页面”图标。
When you swipe , you are forced to land on a one of these "pages" (always a nearest neighbor). 滑动时 ,您将被迫着陆在这些“页面”之一上(始终是最近的邻居)。
I want to use this type of functionality in an app, but I don't want to recreate the code when something like this likely already exists in one of the many iOS frameworks. 我想在应用程序中使用这种类型的功能,但是当许多iOS框架之一中已经存在类似的东西时,我不想重新创建代码。 What are the classes/IFB elements I should be looking at?
我应该查看哪些类/ IFB元素?
this is for an iOS 5 iPad project 这是针对iOS 5 iPad项目的
UIScrollview
has a pagingEnabled
property that when set to YES
forces it to stop on exact multiples of the view width when scrolled. UIScrollview
具有pagingEnabled
属性,当设置为YES
时,它会强制其在滚动时停止在视图宽度的精确倍数上。
That's how the home screen works, and that's what you should use. 这就是主屏幕的工作方式,这就是您应该使用的方式。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.