滑动即可更改视图 [英] Swipe to change views

查看:173
本文介绍了滑动即可更改视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下是否容易编码?

我有一个tableview,当用户选择一个单元格时,会加载一个详细视图。
我想允许用户通过左右滑动在表格视图中表示项目的项目/细节视图中进行导航,其工作方式与例如iphone的主屏幕(例如,在滑动时,一页正在移出屏幕而下一页显示)。

I have a tableview and when the user selects a cell a detail view is loaded. I want to allow the user to navigate throughout the items/detail-view representing the items in the tableview by left and right swipes, working in the same way as e.g. the home-screen of the iphone (e.g. while swiping, one page is moving off the screen and the next appears).

我在MobileRSS-APP中看到了这一点,所以有可能,但我只是很难找到正确的方法。

I have seen this implemented in the MobileRSS-APP, so it is possible, but I just have a hard-time figuring out the way to do it properly.

提前感谢一百万!我仍然试图用可可触摸找到我的脚...

Thanks a million in advance! I am still trying to find my feet with cocoa-touch...

推荐答案

这不是秘密,Apple提供的样本名为 PageControl 的代码,可准确演示您的需求实现:

This is not a secret, Apple provides the sample code called the PageControl that demonstrates exactly what you want to achieve:


此应用程序主要演示如何使用UIScrollView的分页功能将水平滚动用作在不同内容页面之间导航的机制。 / p>

This application primarily demonstrates use of UIScrollView's paging functionality to use horizontal scrolling as a mechanism for navigating between different pages of content.

我在我的很多应用中实现了它

这篇关于滑动即可更改视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆