2015-04-29 15 views
0

當我打印PHAsset的說明時,它包括assetSource = 3assetSource = 0。我可以知道這是什麼assetSource是什麼意思?什麼是像3,0相關的數字?按照我的觀察與assetSource = 3的特定PHAsset其ALAssetsLibrary defaultRepresentation URL包括EXT = MOV和PHAsset與assetSource = 0其ALAssetsLibrary defaultRepresentation URL包括EXT = MOV。 assets-library的URL和assetSource是相關的嗎?我請求某人澄清我的問題。PhotoKit frameWork:什麼是PHAsset的assetSource?

我已經通過以下鏈接PHAsset: What is 'assetSource'?。但力不明確。

+0

的可能重複[PHAsset:什麼是 'assetSource'](http://stackoverflow.com/questions/26393286/phasset-what-is-assetsource) – Simon

回答

0

好的,好吧,讓我重新檢查您檢查出的鏈接。

有公共和私有財產。這些也存在於Apple的框架中。蘋果希望你觸摸公共屬性(在.h中聲明),但他們不希望你看到私有屬性(用.m聲明)。

因此,assetSource是蘋果在內部使用的私有屬性,這意味着您不應該將其作爲內部框架來觸及它。打印描述時只能看到它,因爲它仍然是一個屬性。你不能訪問它,你也不會知道數字的含義。

我假設數字是文件來源的內部枚舉,但是再一次,內部=您不應該介意它的Apple私有屬性。

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:@[email protected]

相關問題