I created a custom UITableViewCell , and when I show it, I have this result (I am running xcode 6 and iOS 8 beta 1 on iPhone 5.)
http://imgur.com/2MyT0mF,Nx1o4bl#0
And when I turn my device and then turn back to the portrait, everything becomes right.
http://imgur.com/2MyT0mF,Nx1o4bl#1
Please note that when I used xcode 5 to compile my application, I had no problems.
Code used in cellForRowAtIndexPath:
BGTCoursCell1 *cell = (BGTCoursCell1 *)[tableView dequeueReusableCellWithIdentifier:@"Cell"]; NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@"BGTCoursCell1" owner:self options:nil]; cell = [nib objectAtIndex:0]; NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; [dateFormatter setDateFormat:@"HH:mm"]; NSLocale *locale = [NSLocale currentLocale]; [dateFormatter setLocale:locale]; if (indexPath.section == 0) { BGTCours *cours = [[currentDay coursMatin] objectAtIndex:indexPath.row]; cell.matiereLabel.text = [cours matiere]; cell.salleLabel.text = [cours salle]; cell.heureLabel.text = [NSString stringWithFormat:@"De %@ Γ %@", [dateFormatter stringFromDate:[cours beginDate]], [dateFormatter stringFromDate:[cours endDate]]]; } else { BGTCours *cours = [[currentDay coursAprem] objectAtIndex:indexPath.row]; cell.matiereLabel.text = [cours matiere]; cell.salleLabel.text = [cours salle]; cell.heureLabel.text = [NSString stringWithFormat:@"De %@ Γ %@", [dateFormatter stringFromDate:[cours beginDate]], [dateFormatter stringFromDate:[cours endDate]]]; } return cell;
Thanks!
ios objective-c uitableview
Benjg37
source share