从 UIScrollView 内部将 UITableView 缩放到全屏
由于未能尝试将不同来源拼凑成任何形式的连贯方法或概念,我再次向 StackOverflow 的博学之士求助。我的问题非常具体,也许这就是为什么我很难找到合适的信息,或者也许我只是不擅长搜索。不管怎样,就这样吧。
我正在构建一个应用程序,其中有一个 UIScrollView,其中填充了 UIViews,而 UIViews 又填充了 UITableViews。我已经进行了寻呼,一切都已设置并正常工作。基本上,我试图反映 Safari 的(移动)选项卡行为的功能,或者(甚至更接近我想要实现的)Tweetdeck 的主页。我无法发布图片,但如果您点击下面的链接,您就会明白我的意思。
http://www.redmondpie.com/wp-content/uploads /2009/07/TweetdeckIphone04.jpg
UITableViews 位于 UIViews 内部的原因是,这是我能想到的使 tableViews 之间有空间而不是彼此相邻的唯一方法。我尝试设置tableViews的大小和scrollView的插入,等等,但tableviews总是最终填充整个scrollView。无论如何,这是一个单独的问题,可能
当我单击滚动视图内的 tableView/UIView 时,我希望该 tableView/UIView 放大并填充整个屏幕(减去 tabBar 和 navigationBar),然后我应该能够按导航栏上的后退按钮将其缩小。
任何信息或正确方向的推动都将受到高度赞赏。
Having failed in trying to puzzle together different sources to any form of coherent approach or concept I turn, once again to the learned people of StackOverflow. My problem is quite specific and maybe that's why I'm having trouble finding information that fits or maybe I just suck at searching. Either way, here goes.
I am building an app which has a UIScrollView populated with UIViews which in turn are populated with UITableViews. I have paging and everything set up and working properly. Basically, I am trying to mirror the functionality of Safari's (mobile) tab behaviour, or (even closer to what I'm trying to achieve) Tweetdeck's main page. I couldn't post an image but if you click on the link below you'll see what I mean.
http://www.redmondpie.com/wp-content/uploads/2009/07/TweetdeckIphone04.jpg
The reason for the UITableViews are inside UIViews is that this was the only way I could figure out to make the tableViews have a space between them, instead of being right next to each other. I tried setting the size of the tableViews and the inset of the scrollView, among many things but the tableviews always ended up filling the entire scrollView. In any case, that is a separate issue, possibly
As I click on a tableView/UIView inside the scrollView I want that tableView/UIView to scale up and fill the entire screen (minus tabBar and navigationBar), and then I should be able to scale it back down by pressing the back button on the navigationBar.
Any information or nudges in the right direction is greatly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我在我的应用程序中做了类似的事情:
在此代码中,tableViews 是滚动视图包含的所有
UITableView
的数组。我做的比这多一点,因为我正在截取视图的屏幕截图,并使用
UIImageView
作为缩放视图,然后以动画方式返回到相应的UIWebView
。该方法的一个优点是我可以将UITapGestureRecognizer
附加到UIImageView
,而不必费力关闭UITableView
上的 userInteraction。I am doing something similar in my app:
In this code
tableViews
is an array of all theUITableView
s that the scrollView contains.I am doing a little more than this because I am taking a screenshot of my view and using a
UIImageView
for the scaled view and then animating back out to the respectiveUIWebView
. One advantage to that approach is that I can just attach aUITapGestureRecognizer
to theUIImageView
and not have to mess with turning off userInteraction on theUITableView
.