Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't find segues without identifiers

I've got a warning in Xcode 6 and 7 that says:

"Segues initiated directly from view controllers must have an identifier"

However, when I look at ALL the segues in the storyboard, they all have identifiers, and I call them all programmatically. It's not a show stopper by any means - the app builds and is totally useable. I just don't like warnings.

There are somewhat related questions like this one, but it's not the issue I'm seeing.

Are there places that hidden segues can live? Or a master list of segues that I can look at?

like image 506
waffles Avatar asked Nov 29 '22 10:11

waffles


2 Answers

a master list of segues that I can look at

Absolutely. Control click on the storyboard's listing in the Project navigator and choose Open As > Source Code. Now you can read — and search — the storyboard as XML. Look for a <segue ... /> without an identifier attribute.

like image 80
matt Avatar answered Dec 19 '22 14:12

matt


Once you've followed the suggestions in this post, you might need to restart Xcode. One indication for this is that the warning count is greater than the actual number of warnings that are showing up in the warnings panel. Doing a Clean or Clean Build Folder, rebuild, etc. may not clear this warning. I've experienced this issue with builds as late as Xcode 8.2.1

like image 43
Wizkid Avatar answered Dec 19 '22 12:12

Wizkid