IOS Add UIView below UITableView

I have a UITableView under which (not in the title!) I need a new UIView. This is done on WhatsApp, on the Chats tab (here I am here, so I can’t add a picture!).

Any help would be greatly appreciated.

Hello

+4
source share
3 answers

Create a parent UIView to contain a UITableView and another UIView. Add these views as views to the parent view.

+2
source

Edited answer:

Can you do this. Initialize 2 buttons or 2 views in.

In cellForRowIndexPath:

UIView * superView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 45)]; [superView addSubview:view1]; [superView addSubview:view2]; // You should make sure that CGRectMake of view1 + view 2 = superView // Check if (indexPath.row == lastRow) { [cell addSubview: superView] } 

Original answer:

You have to use

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

I think the exact answer you are looking for is available here !!

+2
source

UITableView has a backgroundView property that you can set.

-1
source

All Articles