我工作在具有夫婦的意見第一種觀點的條件放在我想如果條件滿足則僅導航應該發生如何在故事板
爲此,我已經使用自定義的故事板採用基於條件的自定義SEGUE繼續,但無論我的情況是否滿足,它都會導航到新的視圖。
我創建方法定製賽格瑞類
- (void) perform{
NSLog(@"source %@",self.sourceViewController);
NSLog(@"dest %@",self.destinationViewController);
UIViewController *sVC=self.sourceViewController;
UIViewController *dVC=self.destinationViewController;
[sVC.navigationController pushViewController:dVC animated:YES];
}
我想設置條件,如果結果是1,那麼只有它應該導航。 Woul prepareforsegue或initwithsegue爲我提供任何幫助
格式化您的代碼。 –