How to set scene name on xcode's storyboard

28.9k views Asked by At

I am using the CoreDataBooks sample project from Apple to use with the Zucchini automated test framework. I need the view name to use in the coffeescript to manage it like this:

class BooksScreen extends Screen anchor: -> $("navigationBar[name=Authors]")

In this example, the Authors is used to identify the view. I figured in xcode that we have this name after view controller class of each scene, like the New Book scene:

enter image description here

The problem is, I don't know how to set that name, so I can manage it in the coffeescript. How to do this?

5

There are 5 answers

1
vignesh On BEST ANSWER

You have set the name for view controller in Interface Builder.

  1. Select view controller
  2. Now from menu View->Utilities->Show attributes inspectors
  3. Set view controller title.
0
Laura Ruival On

If you rename the navigation item it will rename the scene as well. Select the navigation item for the scene you want to rename in the Object Browser on the left, then go to the Attributes inspector on the right and change the Title to the name you want. It will automatically rename the navigation item and the scene.

See screenshot:

Rename Scene by Renaming Navigation Item

4
Howard Lovatt On

In the left hand list double click on the name of the view controller, not the scene name, and rename the view controller, that will also rename the scene.

enter image description here

0
Marina On

You have to click on the name of the view controller and wait. Click very slowly, you have to click and hold for some time. Do not click twice, you only need to click once but it has to be a long click.

0
Alien On

do it in Xcode right column like following image, enter new scene name and press enter button.

enter image description here