Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/spring-mvc/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 如何在Interface Builder中键入新行?_Ios_Interface Builder - Fatal编程技术网

Ios 如何在Interface Builder中键入新行?

Ios 如何在Interface Builder中键入新行?,ios,interface-builder,Ios,Interface Builder,我在视图控制器中插入了一个UITextView。我想将文本设置为,例如: hello world 我只需在view controller类中添加一个插座,并在viewDidLoad中进行如下设置: myTextView.text = "hello\nworld" 但我希望能够直接在interface builder中设置它!所以我尝试了以下方法,但都不起作用 键入“hello”并按return 键入“hello\nworld” 键入“hello”并按住shift键并输入 我终于试着把文字

我在视图控制器中插入了一个
UITextView
。我想将文本设置为,例如:

hello
world
我只需在view controller类中添加一个插座,并在
viewDidLoad
中进行如下设置:

myTextView.text = "hello\nworld"
但我希望能够直接在interface builder中设置它!所以我尝试了以下方法,但都不起作用

  • 键入“hello”并按return
  • 键入“hello\nworld”
  • 键入“hello”并按住shift键并输入
我终于试着把文字写在别的地方,然后把它复制/粘贴到盒子里,它终于成功了


但说真的?有更好的方法吗?

在界面生成器中使用(option+enter)而不是(shift+enter)。

在界面生成器中使用(option+enter)而不是(shift+enter)。

在界面生成器中使用(alt+enter)或(option+enter)


希望这将对您有所帮助。

在界面生成器中使用(alt+enter)或(option+enter)


希望这能对您有所帮助。

这是什么意思使用选项+输入这不是答案这是什么意思使用选项+输入这不是答案已经是同一个答案,因为您必须添加注释而不是答案:)我有写alt not选项。你就是那个评论什么是选项的人。:)我不是狮子,我是尼拉夫。检查我的个人资料和狮子的个人资料。在认识某人之前不要写任何东西。让我们一起写。已经给出的相同答案必须添加为注释而不是答案:)我有写alt not选项。你就是那个评论什么是选项的人。:)我不是狮子,我是尼拉夫。检查我的个人资料和狮子的个人资料。在认识某人之前不要写任何东西。让我们一起来。