ios 如何在 xcode 的故事板上设置场景名称
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/25164873/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to set scene name on xcode's storyboard
提问by André Muniz
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:
我正在使用 Apple 的 CoreDataBooks 示例项目与 Zucchini 自动化测试框架一起使用。我需要在咖啡脚本中使用的视图名称来像这样管理它:
class BooksScreen extends Screen
anchor: -> $("navigationBar[name=Authors]")
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:
在此示例中,作者用于标识视图。我想在 xcode 中,我们在每个场景的视图控制器类之后都有这个名字,比如 New Book 场景:
The problem is, I don't know how to set that name, so I can manage it in the coffeescript. How to do this?
问题是,我不知道如何设置该名称,因此我可以在 coffeescript 中对其进行管理。这该怎么做?
回答by vignesh
You have set the name for view controller in Interface Builder.
您已经在 Interface Builder 中设置了视图控制器的名称。
- Select view controller
- Now from menu View->Utilities->Show attributes inspectors
- Set view controller title.
- 选择视图控制器
- 现在从菜单视图->实用程序->显示属性检查器
- 设置视图控制器标题。
回答by Cattla
回答by Marina
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.
您必须单击视图控制器的名称并等待。单击非常缓慢,您必须单击并按住一段时间。不要单击两次,您只需单击一次,但必须是长按。