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

后端 未结 9 2420
孤街浪徒
孤街浪徒 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 07:44

    The default height is 44.0f for a tableview cell I believe. You must be having your datasource in hand in a Array? Then just check if [array count]*44.0f goes beyond the frame bounds and if so set tableview.scrollEnabled = NO, else set it to YES. Do it where you figure the datasource out for that particular tableview.

提交回复
热议问题