UITableView showing more rows than specified in numberOfRowsInSection:

后端 未结 9 1086
谎友^
谎友^ 2021-02-01 03:32

I want my tableView to show 6 rows with text in it, in this case \"Example.\" As far as I can tell, I have my numberOfSectionsInTableView: and numberOfRowsIn

9条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-01 03:35

    This is Because of Your Table-view Height. Weather you have Write

    - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    

    // Return the number of rows in the section. return 6; }

    But its show rows According to Table-view Size. If you Dont want to show This extra Lines then Make UITableView Style Plain To Grouped.

提交回复
热议问题