小编D. *_*reg的帖子

Xcode 7中两个UIImage视图之间的引脚水平间距

我是初学者,使用Xcode 7 beta,使用Xcode 6编写教程.在教程中,教师选择Editor,Pin和Horizo​​ntal Spacing来固定两个图像之间的空间,以便在切换到横向时保持不变.在Xcode 7中,Editor菜单不包含Pin菜单.有谁知道如何在新的Xcode 7中固定两个图像之间的水平间距?

xcode ios xcode7

14
推荐指数
2
解决办法
6876
查看次数

Swift 3 - 如何使用枚举原始值作为NSNotification.Name?

我正在使用Xcode 8 beta 5,我正试图设置这样的通知枚举

enum Notes: String {
  case note1
  case note2
}
Run Code Online (Sandbox Code Playgroud)

然后尝试将它们用作通知名称

NotificationCenter.default.post(name: Notes.note1.rawValue as NSNotification.Name,
                                object: nil, userInfo: userInfo)
Run Code Online (Sandbox Code Playgroud)

但是我收到了一个错误.

Cannot convert value of type 'String' to specified type 'NSNotification.Name'

有工作吗,还是我错过了什么?它适用于Xcode 7.3.1

任何帮助,将不胜感激.

xcode enums nsnotificationcenter swift3

13
推荐指数
3
解决办法
1万
查看次数

标签 统计

xcode ×2

enums ×1

ios ×1

nsnotificationcenter ×1

swift3 ×1

xcode7 ×1