Xcode 7所谓的“语义"视图是什么?故事板设置? [英] Xcode 7 what is the view "semantic" storyboard setting?

查看:107
本文介绍了Xcode 7所谓的“语义"视图是什么?故事板设置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看到iOS9和xCode7在情节提要配置中引入了一个名为语义"的新字段.谷歌搜索没有在顶部显示相关结果.

I see that iOS9 and xCode7 introduced a new field called "semantic" into storyboard config. A google search did not reveal relevant results on top.

视图语义字段的意义是什么?

推荐答案

iOS 9中提供了新的国际化支持,它可以根据当前系统语言从左向右翻转界面,反之亦然.您可以选择阿拉伯语进行测试.从右到左读取阿拉伯语,因此界面被翻转.

There is a new internationalization support in iOS 9, which enables flipping of the interface from left to right and vice versa depending on the current system language. You can choose Arabic language to test it. Arabic is read from right to left, so the interface is flipped.

在这里,您可以阅读其中的Apple指南.

Here you can read the Apple's guide on it.

情节提要中的语义"属性是一条规则,可让iOS知道是否应该翻转视图.有多种选择:

The property "Semantic" in the storyboard is a rule which allows the iOS to know if the view should be flipped or not. There are multiple options:

  • 未指定-视图的默认值.在从左到右和从右到左的布局之间切换时,视图会翻转.
  • 播放-表示播放控件的视图,例如播放",后退"或快进"按钮或播放头清理器.在从左到右和从右到左的布局之间切换时,这些视图不会翻转.
  • 空间-表示方向控件的视图,例如用于文本对齐的段控件或游戏的D-pad控件.在从左到右和从右到左的布局之间切换时,这些视图不会翻转.
  • 从左到右强制-始终使用从左到右的布局显示的视图.
  • 从右到左强制-始终使用从右到左的布局显示的视图.
  • Unspecified - The default value for views. The view is flipped when switching between left-to-right and right-to-left layouts.
  • Playback - A view representing the playback controls, such as Play, Rewind, or Fast Forward buttons or playhead scrubbers. These views are not flipped when switching between left-to-right and right-to-left layouts.
  • Spatial - A view representing a directional control, for example a segment control for text alignment, or a D-pad control for a game. These views are not flipped when switching between left-to-right and right-to-left layouts.
  • Force Left-To-Right - A view that is always displayed using a left-to-right layout.
  • Force Right-To-Left - A view that is always displayed using a right-to-left layout.

来源- Apple的文档

这篇关于Xcode 7所谓的“语义"视图是什么?故事板设置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆