2016-05-17 51 views
1

我正在使用以下方式在兩個視圖控制器之間進行模態轉換,我試圖淡入使用UIModalTransitionStyleCrossDissolve,但它顯示iphone-4S中的警告和Iphone中的錯誤6S,我也header.Can任何人進口的UIKit給我關於這個錯誤的線索我在做什麼與UIModalTransitionStyleCrossDissolve的過渡顯示在iOS SDK中的iPhone6s錯誤9.3

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

出現下面的警告,我不能夠understand-「Ambigous利用內部申報」

回答

0

我想你應該不得不用你的故事板名稱正確地創建UIStoryboard對象。

UIStoryboard *StoryboardObj = [UIStoryboard storyboardWithName:@"yourStoryboardName" bundle:nil]; 
BoookingVC* nextController=[StoryboardObj instantiateViewControllerWithIdentifier:@"BoookingVCID"]; 
+0

謝謝,但問題仍然保持不變。( –

+0

@SaurabhSaini您可以創建使用故事板賽格瑞並設置有所有自定義的喜好和觸發賽格瑞編程方式使用委託方法的代碼_ [自performSegueWithIdentifier:@「myidentifier 「sender:self]; _ – vaibhav

+0

或者您可以使用此[鏈接](http://stackoverflow.com/a/37114648/4003548)切換差異視圖控制器。 – vaibhav