blub
blub

Reputation: 359

Trouble with UIViewControllers when pushing to UINavigationController - iOS 7.1

My iOS 7.1 App has a strange Bug. See Pic below. It's happen when i try to pushing the Alarm-ViewController on UITableView:didSelectRowAtIndexPath Event. Any Ideas how to fix that ?

enter image description here

Code:

-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{

    Alarm *alarm = _settings.sharedSettings[indexPath.row];

    AlarmViewController *alarmViewController = [[AlarmViewController alloc] initWithAlarm:alarm];
    alarmViewController.title = NSLocalizedString(@"TITLE",  nil);

    [self.navigationController pushViewController:alarmViewController animated:YES];
}

Upvotes: 0

Views: 104

Answers (1)

blub
blub

Reputation: 359

Simple Solution. Just set the Background-Color of the UIView.

UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 150)];
view.backgroundColor = [UIColor whiteColor];

//add other Controls to view

self.view = view;

Upvotes: 1

Related Questions