This isn\'t a duplicate I read the other questions regarding this and none of them gave me what i needed , I\'m creating a table view with custom cell and the style is group
Many ways to do it, but I found this is the simplest and easiest way to do so.
Set UITableView style grouped. Then have two sections and each section has only one row. Replace your image in the row.
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
//array is your db, here we just need how many they are
return [array count];
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
return 1;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
//place your image to cell
}
- (float)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
//this is the space
return 50;
}