How to disable scrolling in UITableView table when the content fits on the screen

后端 未结 9 2405
孤街浪徒
孤街浪徒 2020-12-07 07:36

I have a few (grouped style) tables in my iphone app (only on part of the screen and added with Interface Builder though, not subclassed from UITableViewC

相关标签:
9条回答
  • 2020-12-07 08:02

    // Enable scrolling based on content height self.tableView.scrollEnabled = table.contentSize.height > table.frame.size.height;

    0 讨论(0)
  • 2020-12-07 08:07

    try this

    [yourTableView setBounces:NO];
    
    0 讨论(0)
  • 2020-12-07 08:08

    You can edit this in your storyboard (if you are using one). Under the table view there is a checkbox that says "Scrolling Enabled". Uncheck it and you're done.

    0 讨论(0)
提交回复
热议问题