Since the creation of the new iOS 11 update, I have an application that will show empty table rows on the simulator and device. Even line separators will not be displayed for any of the lines that should be there. If I change the simulator to an earlier version of iOS, the lines will be displayed in order. No changes to the code or storyboard.
The lines still have data, that is, I can click on one of the empty lines, and it will execute the code and will contain the information that I expected.
It seems that the other scenes that I have where the tableview fits in the view and I don't use the inline text label works fine. It's just that this tableview class uses an inline text label.
Here is my code for the tableview class ...
@interface BunkPickTableViewController () @end @implementation BunkPickTableViewController @synthesize appDelegate, delegate, bunkPassedValue; - (void)viewDidLoad { [super viewDidLoad]; UIView *backgroundView = [[UIView alloc] initWithFrame:self.view.bounds]; appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate]; CAGradientLayer *bgLayer = [BackgroundLayer tanGradient]; bgLayer.frame = self.view.bounds; [self.view.layer insertSublayer:bgLayer atIndex:0]; self.tableView.backgroundView = backgroundView; [self.navigationController.navigationBar setTintColor:[UIColor blackColor]]; self.title = @"Bunk Codes"; } - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; [[self navigationController] setNavigationBarHidden:NO animated:NO]; [self.tableView reloadData]; } - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; } #pragma mark - Table view data source - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return 1; } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return [appDelegate.bunkArray count]; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier]; cell.textLabel.textAlignment = NSTextAlignmentCenter; cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; cell.backgroundColor = [UIColor clearColor]; } Bunk *bunkObj = [appDelegate.bunkArray objectAtIndex:indexPath.row]; cell.textLabel.text = bunkObj.bunkId; return cell; } - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [tableView cellForRowAtIndexPath:indexPath].accessoryType = UITableViewCellAccessoryCheckmark; [self.tableView deselectRowAtIndexPath:indexPath animated:YES]; Bunk *bunkObj = [appDelegate.bunkArray objectAtIndex:indexPath.row]; [delegate dismissBunkPop:bunkObj.bunkId]; [self.navigationController popViewControllerAnimated:YES]; } @end
TableView Settings Image
objective-c xcode ios11
Kryckter
source share