使用iPhone上的菜单复制Android ViewPager类型功能 [英] Duplicating Android ViewPager type functionality with menus on the iPhone

查看:78
本文介绍了使用iPhone上的菜单复制Android ViewPager类型功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试复制Android UI左右手势类型的导航.这用于Android Marketplace,也用于iPhone版本的Google +.

I'm trying to duplicate the Android UI left-right gesture type of navigation. This is used in the Android Marketplace, but also on the iPhone version of Google+.

这是我尝试模仿的Google+的youtube链接. http://www.youtube.com/watch?v=RYW9yxhhhPU&t=0m25s

Here is a youtube link of the Google+ in action that I am trying to mimic. http://www.youtube.com/watch?v=RYW9yxhhhPU&t=0m25s

如您在上面的视频中看到的那样,主查看区域上方有一个小的滚动区域.小滚动区域包含文本传入",圆圈",附近",并在滚动主页时​​在它们之间切换.

As you can see in the video above, there is a small scrolling area on top of the main viewing area. The small scrolling area holds the text "Incoming", "Circles", "Nearby" and shifts between them when the main page is scrolled.

我尝试做的(失败)是制作两个UIScrollViews.一种用于主区域,另一种用于较小区域.我将较小的UIScrollView设置为相对于主scrollView的contentOffset.x左移或右移0.5倍.

What I've tried to do (unsuccessfully) is making two UIScrollViews. One for the main area and one for the smaller area. I set the smaller UIScrollView to shift left or right at 0.5x the the contentOffset.x of the main scrollView.

外观有些相似,但是要使较小的滚动视图中的文本标签准确地在左侧,中间和右侧对齐,我遇到了很大的困难.

The look is somewhat similar, but I'm having tremendous difficulty getting the text labels in the smaller scrollview to line up precisely in the left, middle, and right positions.

我不确定这是否是执行此操作的正确方法,但是如果还有其他方法,我很想听听他们的意见.

I'm not sure if this is the right way to go about doing this, but if there are any other ways, I'd love to hear them.

真的很感谢您的帮助!谢谢!

I'd really appreciate any help on this! Thank you!

推荐答案

我也必须为一个项目执行此操作.我大部分都在工作.滚动时减去动画.为此,我已经在github上启动了一个项目.我将不断添加它,但是与此同时,这应该是一个很好的起点.该演示可以在这里找到, https://github.com/btate/BTViewPager

I have to do this for a project as well. I've got it mostly working. Minus the animation when scrolling it. I've started a project on github for this. I will be adding to it as I go, but in the mean time this should be a good jumping off point. The demo can be found here, https://github.com/btate/BTViewPager

这篇关于使用iPhone上的菜单复制Android ViewPager类型功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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