I have a problem with indention in UITableView
. See image to make it clear.
There are just cell with UILabel
.
After launching app, all points have the same indention (like points Schedule & Favourites on picture). But when I scroll it up & then scroll it down back, the indention of labels changes. It appeared in iOS6
as well as in iOS7
.
Does anybody have ideas how to fix it?
EDIT0: It seems than only first rendering (before screen is appeared) works well. All others calls "cellForRowAtIndexPath" return incorrect cell view.
Might be it connected w/ constraints... but i'm not sure.
Anyway the way are supposed by NSS works. Thanks everybody for your help.
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
//#warning Potentially incomplete method implementation.
// Return the number of sections.
return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
//#warning Incomplete method implementation.
// Return the number of rows in the section.
return [activeList count];
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"mainPointCell";
OMSMainActiveCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
// Configure the cell...
[cell.textLabel setText:[activeList objectAtIndex:indexPath.row]];
return cell;
}