0

当我打印 PHAsset的描述时,它包括assetSource=3assetSource=0。我可以知道这个assetSource是什么意思吗?像 3,0 这样的数字与什么有关?根据我对assetSource=3 的特定PHAsset 的观察,它的ALAssetsLibrary defaultRepresentation URL包括ext=MOV和assetSource = 0 的PHAsset,它的ALAssetsLibrary defaultRepresentation URL包括ext=mov。assets-library URL ext 和assetSource 是否相关?我请求某人澄清我的问题。

我已经浏览了以下链接PHAsset: What is 'assetSource'? . 但是没有得到澄清。

4

2 回答 2

1

可能与 iOS9 中即将推出的 PHAssetSourceType 有关。

        struct PHAssetSourceType : OptionSetType { init(rawValue rawValue: UInt)
static var TypeNone: PHAssetSourceType { get }
static var TypeUserLibrary: PHAssetSourceType { get }
static var TypeCloudShared: PHAssetSourceType { get }
static var TypeiTunesSynced: PHAssetSourceType { get }
}

参考https://developer.apple.com/library/prerelease/ios/documentation/Photos/Reference/PHAsset_Class/index.html#//apple_ref/swift/struct/c:@E@PHAssetSourceType

于 2015-09-02T15:44:44.317 回答
0

好的,让我改写您签出的链接。

有公共财产和私人财产。这些也存在于 Apple 的框架中。Apple 希望您触摸公共属性(在 .h 中声明),但他们不希望您看到私有属性(在 .m 中声明)。

因此,assetSource它是苹果内部使用的私有属性,这意味着您不应该将其视为内部框架的东西。您只能在打印描述时看到它,因为它仍然是一个属性。您只是无法访问它,您也不会知道这些数字的含义。

我假设这些数字是文件源的一些内部枚举,但再一次,内部 = 你不应该介意它,它是 Apple 的私有属性。

于 2015-04-29T12:00:00.590 回答