AMH
AMH

Reputation: 6451

How to hide this part of uitableview

I designed a uitable view like in the image below , I want to hide the part under the second section , which I write on it (<- I want to remove this part ->)

enter image description here

any suggestion to do that

Upvotes: 0

Views: 204

Answers (3)

Teodor Kostov
Teodor Kostov

Reputation: 313

You can try creating the table with specific height in the Interface Builder or:

UITableView* pTable = [[UITableView alloc] initWithFrame:(CGRect)];

Maybe you can also specify that scrolling is forbidden in order to show the contents that you want:

pTable.scrollEnabled = NO;

Upvotes: 1

Deepak Danduprolu
Deepak Danduprolu

Reputation: 44633

You might want to implement tableView:heightForFooterInSection: and tableView:heightForRowAtIndexPath: and return heights for the footer of the current section and header of the next section to reduce the gap between the two sections. This of course, if there are sections are the current section. If there are no more sections, then you can just reduce the frame size.

Upvotes: 0

Cyprian
Cyprian

Reputation: 9453

If you coppied the code from someone, this element is the fotter view for the second section. Look for the method:

- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section{

end erase it. It should be out.

Upvotes: 1

Related Questions