ios - Xcode TextView 特定属性 iOS + Swift

标签 ios xcode swift uitextview

我在 Xcode 中有一个 TextView ,我希望 TextView 中的某些行在中心对齐,而其他行在 TextView 中向左对齐。图片:enter image description here

我想了解“紫外线辐射如何发挥作用?”居中对齐,“紫外线原因:”向左对齐。

最佳答案

在 Interface Builder 中,选择要更改对齐方式的文本。打开实用程序 Pane 。单击“属性”检查器(看起来像一个小 slider 控件的检查器)。您应该看到对齐字段。单击所需对齐方式的图标。它应该看起来像这样:

enter image description here

关于ios - Xcode TextView 特定属性 iOS + Swift,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35145813/

相关文章:

iphone - 代码 'CodeSign error: code signing is required'

swift - 如何在 Swift 中使用 UILongPressGestureRecognizer 通过标签属性传递 indexPath.row?

ios - 克隆 UIImage iOS 部分时的内存问题

ios - 如何在 xcconfig 文件中配置完整的 URL

ios - 无法在 View Controller 中看到标签

ios - 使用 Swift 在 iOS 中打印 View

ios - 使用 Firebase 将值与值数组进行比较。 swift

ios - 面朝上或面朝下风景方向

ios - `[NSUserDefaults standardUserDefaults]` 返回零

iOS 自定义 Segue 不工作