[英]How to scroll UITableView if its content size more than screen size?
My problem is that how I can scroll through TableView if its content size more than screen size? 我的问题是,如果内容大小大于屏幕大小,如何滚动TableView?
I have this code in my project (a lot of code, don't know which part makes me cry): 我的项目中有这段代码(很多代码,不知道哪一部分让我哭泣):
http://pastebin.com/BHXf9tER http://pastebin.com/BHXf9tER
Sometimes it goes well, but sometimes(and it's a big problem) it goes bad and I can't scroll : In my project I use storyboard, so this is my view controller. 有时效果不错,但有时(这是一个大问题),效果很差,我无法滚动:在我的项目中,我使用情节提要,所以这是我的视图控制器。 http://i.stack.imgur.com/arb0h.png What can I do?
http://i.stack.imgur.com/arb0h.png我该怎么办? Please help me.
请帮我。
[QUESTION UPDATED] [问题已更新]
You shouldn't set the frame
to the table view contentSize
. 您不应该将
frame
设置为表格视图contentSize
。 Take out that code and then set the frame of the table view to the size of the screen in the nib/storyboard. 取出该代码,然后将表视图的框架设置为笔尖/故事板上的屏幕大小。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.