我的iOS 7.1应用有一个奇怪的错误。请参阅下面的图片。当我尝试在UITableView:didSelectRowAtIndexPath事件上推送Alarm-ViewController时,就会发生这种情况。任何想法如何解决?



码:

-(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];
}

最佳答案

简单的解决方案。
只需设置UIView的Background-Color。

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

//add other Controls to view

self.view = view;

08-05 21:46