0

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];
}
3
  • 1
    You are pushing a view controller with an UIPickerView and it shows up transparent? is that it? Maybe you can explain the problem better.
    – Tiago Lira
    Sep 4, 2014 at 11:38
  • Yes and No. Okay let me try to explain better. I have a TableViewController from there i try to push to an other ViewController (AlarmViewController). The AlarmViewController is splitted (Top: DatePicker, Bottom: SettingsTableView) like the Standard iOS7 AlarmClock-App in the Edit-Mode. Okay, now AlarmViewController will pushing but when pushing (from the TableViewController to AlarmViewController) overlaps the TableViewController with AlarmViewController during animation duration. The Overlaps appears only on the Top-Part of the AlarmViewController but in BOTH directions. It's clearer? Thanks
    – blub
    Sep 4, 2014 at 12:13
  • @TiagoLira: Okay, i could solve me Problem. You give the right hint. You are right, i just needed to set background-color=white to the View of AlarmViewController and there is no transparency and overlapping anymore. Thank you!
    – blub
    Sep 4, 2014 at 12:28

1 Answer 1

1

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;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.