Ostmeistro
Ostmeistro

Reputation: 394

XCode custom segue class stuck

this question might seem a little weird, but I can't wrap my head around why this is happening.

What I did was I renamed a custom segue class, and reflected it in the storyboard under 'custom class', but it still tries to call the old one.

I have cleaned the build folder and searched the project for the old custom class name and it does not find anything in xcode at least. I look inside the storyboard file, it's not there either.

Even if I delete the custom segue all toghether I get:

'Could not find a segue class named 'xxxxxxxxx''

The thing is I cannot understand from where it gets 'xxxxxxxxx' above, it is not in the storyboard file or in the code..

[[[self view] viewWithTag:1] resignFirstResponder];

When I debug this is where it goes to thread kill showing the error. I have removed all the outlets, events and segues on the textfield. I have no custom segue using 'xxxxxxxxx' as a class anywhere.

Is there any other thing I can do to clean the project more thoroughly? Where to begin?

Upvotes: 12

Views: 7051

Answers (5)

Ammar Mujeeb
Ammar Mujeeb

Reputation: 1311

My problem was i explicitly set the "Class" name in interface builder; which was not required. It is managed by Xcode and default to UIStoryboardSegue.

Upvotes: 1

mobibob
mobibob

Reputation: 8794

Check out this other SO question. Answer to "Issue #1" by declaring the custom-seque-class to be and objective-c class

Similiar SO Q&A - speaks to a flaw in XCode

Summary of answer:

@objc(CustomSequeLeft2Right)
class CustomSequeLeft2Right {
.
.
.
}

Upvotes: 4

chris838
chris838

Reputation: 5178

This was what worked for me - I had to select the segue in interface builder and set the module from "None" to my project name, which appeared in the dropdown.

Upvotes: 76

nhahtdh
nhahtdh

Reputation: 56809

The answer is to reset the storyboard target membership, then reset the simulator.

Upvotes: 7

Centurion
Centurion

Reputation: 14304

For others that came from the web searching for the answer: check if you have included implementation file in Build Phases. In my case, I had several targets and the second target was missing this implementation file.

Upvotes: 6

Related Questions