Re: AVSimplePlayer in Swift?
Re: AVSimplePlayer in Swift?
- Subject: Re: AVSimplePlayer in Swift?
- From: Quincey Morris <email@hidden>
- Date: Sun, 08 Jan 2017 01:33:28 -0800
- Feedback-id: 167118m:167118agrif8a:167118s3CoHpvY2u:SMTPCORP
On Jan 7, 2017, at 13:24 , Charles Jenkins <email@hidden> wrote:
>
> If I take that working code and the ONLY changes I make are to (a) change
> currentTime to the code below and (b) add the binding in IB, the video will
> not play. The strange thing is when I do this, I think KVO is actually
> working because I get hammered with log messages saying “Seek to 0.0
> seconds.”
>
> dynamic var currentTime : Double {
Is this issue resolved?
If not, it seems to me there’s a problem that “Double” is a Swift type, and it’s not the same as the Obj-C “double” type. AFAIK, these 2 types are never identical, although there is bridging at the SDK and API levels. However, I doubt that KVC knows about the Swift types, so it’s not going to do the automatic translation to NSNumber that happens in the Obj-C version of your code.
If I’m right, then solution might be to declare your properties as type “CDouble”, which *is* the same as the C (and hence Obj-C) “double” type.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden