3 回答

TA貢獻1887條經(jīng)驗 獲得超5個贊
UIBarButtonItem *buttonizeButton = [[UIBarButtonItem alloc] initWithTitle:@"Buttonize" style:UIBarButtonItemStyleDone target:self action:@selector(buttonizeButtonTap:)];self.navigationItem.rightBarButtonItems = @[buttonizeButton];
-(void)buttonizeButtonTap:(id)sender{ [self performSegueWithIdentifier:@"Associate" sender:sender]; }
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender{ if ([[segue identifier] isEqualToString:@"Associate"]) { TranslationQuizAssociateVC *translationQuizAssociateVC = [segue destinationViewController]; translationQuizAssociateVC.nodeID = self.nodeID; //--pass nodeID from ViewNodeViewController translationQuizAssociateVC.contentID = self.contentID; translationQuizAssociateVC.index = self.index; translationQuizAssociateVC.content = self.content; }}

TA貢獻1827條經(jīng)驗 獲得超8個贊
UIViewController *toViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"OtherViewControllerId"]; MyCustomSegue *segue = [[MyCustomSegue alloc] initWithIdentifier:@"" source:self destination:toViewController]; [self prepareForSegue:segue sender:sender];[segue perform];
- 3 回答
- 0 關(guān)注
- 608 瀏覽
添加回答
舉報