1

I am using the following way to transition modally between two view controller, i am trying to fade in using UIModalTransitionStyleCrossDissolve but it shows warning in iphone-4S and as an error in Iphone 6S, i also imported UIKIT in header.Can anyone give me clues about the mistake i am doing

BoookingVC* nextController=[self.storyboard instantiateViewControllerWithIdentifier:@"BoookingVCID"];
nextController.userId=userId;
nextController.customerId=customerId;


nextController.providesPresentationContextTransitionStyle = YES;
nextController.definesPresentationContext = YES;

nextController.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
[nextController setModalPresentationStyle:UIModalPresentationOverCurrentContext];
[self.navigationController presentViewController:nextController animated:YES completion:nil];

It shows the following warning, i am not able to understand-"Ambigous use of internal declaration"

1 Answers1

0

i think you should have to create UIStoryboard object properly with your storyboard name ..

UIStoryboard *StoryboardObj = [UIStoryboard storyboardWithName:@"yourStoryboardName" bundle:nil];
BoookingVC* nextController=[StoryboardObj instantiateViewControllerWithIdentifier:@"BoookingVCID"];
vaibhav
  • 4,038
  • 1
  • 21
  • 51
  • Thanks ,but the issue still remain the same..( – Saurabh Saini May 17 '16 at 11:05
  • @SaurabhSaini you can create segue using storyboard and set all custom preferences there and trigger segue programmatically using delegate method with code _[self performSegueWithIdentifier: @"myidentifier" sender: self];_ – vaibhav May 17 '16 at 11:16
  • or you can use this [link](http://stackoverflow.com/a/37114648/4003548) to switch over diff viewcontrollers .. – vaibhav May 17 '16 at 11:18
  • I am trying to show "Fade-In" effect, in which i require to present modally with no animation..my question is ,it is also not deprecated to use..so how to use it? – Saurabh Saini May 17 '16 at 12:18
  • lots of ans over here you could try hard ..have a look this [link](http://stackoverflow.com/a/30996248/4003548) hope this helps .. – vaibhav May 17 '16 at 12:24