i have this code
var times = [NSValue]()
for time in timePoints {
times.append(NSValue(CMTime : time))
}
i get an error that their is nothing called CMTime in swift 3 i can't really find any param for cm time..
Check the reference of NSValue
.
init(time: CMTime)
Use NSValue(time: time)
.
One more. If you want to convert [CMTime]
to [NSValue]
, you can write something like this:
let times = timePoints.map(NSValue.init(time:))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With