目前我的错误说我的视图控制器已经呈现空值。我认为我对下面的代码有正确的想法,但我没有正确实现它。谢谢你的帮助
-(IBAction)datePicker
{
//UIViewController *presenter = self.presentingViewController;
[self dismissViewControllerAnimated:YES completion:^{
/*
UIStoryboard* sb = [UIStoryboard storyboardWithName:@"MainStoryboard.storyboard"
bundle:nil];
UIViewController* dateView = [sb instantiateViewControllerWithIdentifier:@"DatePickerViewController"];
*/
[self performSegueWithIdentifier:@"dueDateSegue" sender:self];
//[presenter presentViewController:dateView animated:YES completion:nil];
/*
[self presentViewController:dateView animated:YES completion:^{
UIBarButtonItem *saveDate = [[UIBarButtonItem alloc]
initWithTitle:@"Save Date"
style:UIBarButtonItemStyleDone
target:self
action:@selector(labelDatePicker)];
self.navigationItem.rightBarButtonItem = saveDate;
pick = [[UIDatePicker alloc] init];
[pick setFrame:CGRectMake(0,200,320,120)];
//[pick addTarget:self action:@selector(done) forControlEvents:UIControlEventValueChanged];
//dateFieldText.delegate = self;
//dateFieldText.inputView = pick;
}];
*/
}];
}