Reputation: 218
Is there a best way to set margin between UITableViewCell, i have one image and a label in table cell, i know this question can be marked as possible duplicate but i have searched a lot and the solution found almost everywhere was ;
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
return yourArry.count;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return 1;
}
but problem is that when i tried the above code, the function cellForRowAtIndexPath returned 0 every time and ultimately the whole table was showing the same value in each cell. As i am new to IOS developing, i am unable to resolve this issue, any suggestion will be highly appreciated.
Upvotes: 0
Views: 59
Reputation: 218
Resolve it, i just set the margin bottom (reset the constraints in AutoLayout) between the imageView and cell container like 10.5, now the imageView is not getting attached with the next cell.
Upvotes: 1