Ary*_*yap 4 cocoa-touch ios swift swift2 swift3
我有这个代码
var times = [NSValue]()
for time in timePoints {
times.append(NSValue(CMTime : time))
}
Run Code Online (Sandbox Code Playgroud)
我得到一个错误,他们在swift 3中没有什么叫做CMTime我真的找不到cm时间的任何参数.
OOP*_*Per 11
检查参考NSValue.
Run Code Online (Sandbox Code Playgroud)init(time: CMTime)
使用NSValue(time: time).
多一个.如果你想转换[CMTime]成[NSValue],你可以写这样的东西:
let times = timePoints.map(NSValue.init(time:))
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1652 次 |
| 最近记录: |