Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.1k views
in Technique[技术] by (71.8m points)

ios - segue with correct identifier can not work

I've search almost every related question, but still can not find a clue...

Here is what I did:

1.Create a scrollView using storyboard.

2.Programticaly created 10 myController(which are UITableViewControllers) inside the scrollViewController, So I can use panGesture to switch between tables. and it's working fine.

3.Created a tableViewController using storyboard, set myController to be the corresponding view controller.

4.Embedded the tableViewController in navigation controller.

5.Control drag from tableViewController to a new view controller to create a push segue.

6.Setup segue identifier in storyboard.

enter image description here

The Problem is:

A. When try to segue programmaticaly: use [self performSegueWithIdentifier:@"test" sender:self]; in tableView:didSelectRowAtIndexPath: method.

The exception shows all the time:Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Receiver (<MyTableViewController: 0x8b413c0>) has no segue with identifier 'test''

B. Than I tried prepareForSegue: but it has never been called.

C. I've checked the segue identifier...there is no problem at all.

What's happening here??? Anyone has any idea???

EDIT:

ScrollViewController and TableViewController are separately created on the same storyboard. no connection/segue between them.

PIC Updated.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...