How sort storyboard's view controllers alphabetically by name or locate a VC in storyboard quickly?

StackOverflow https://stackoverflow.com/questions/14346138

Pregunta

When you open a storyboard, and expand the "Document Outline", by clicking the arrow in the bottom left hand corner, you get a list of View Controllers in the story board. You can also get this list by clicking on any view controller, and then, on the top, clicking and holding the second-last node.

Both lists of view controllers are not sorted. I have 100+ view controllers in my storyboard, and it takes a while to locate the appropriate view controller, if I forgot the exact name. Does anyone know how to quickly jump to view controllers in the storyboard from the class name, or sort either the "Document Outline" view or the view controller list on the top alphabetically by name?

¿Fue útil?

Solución

If you know the name of the view controller, you can type it in the space at the very bottom of the document outline. It has a small half filled in circle in it. If you don't know the whole name type in something like it and it will list VC's with similar titles. Hope this helps you out.

Otros consejos

Douglas suggests using the filtering functionality. It is not what the OP asked originally, but it can be a sufficient functional replacement.

As of XCode 7 there does not seem to be a storyboard-friendly way to rearrange it. However, it is possible to edit the XML associated to the storyboard to rearrange those scenes:

This can be done via storyboard xml. Just right click storyboard and open it as an xml. You should be able to see tag "scenes" which contains "scene" which is viewcontroller. The order presented under "scenes" tag correspond to the one you can see under document outline.

As you may assume just copy paste the whole "scene" content to the place you want to see it in document outline.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top