2014-10-15 3 views
1

PHFetchResult를 열거합니다.PHAsset : 'assetSource'란 무엇입니까?

<PHAsset: 0x178192140> 4CBE5A4F-90BD-438B-954E-6FF1B14538CD/L0/001 mediaType=1/0, assetSource=3, (2448x3264), creationDate=2014-10-15 14:20:12 +0000, location=1, hidden=0, favorite=1 

사람이 assetSource=3 비트는 무엇을 알고 있습니까 : 나는이 PHAssets에에 println이 반환되는 경우,이 얻을? 가능하다면 assetSource에 대한 술어를 실행하고 싶습니다. 그러나 그것이 무엇인지 또는 액세스하는 방법에 관한 정보를 찾을 수 없습니다. 비공개인가요?

답변

2

assetSource은 개인 변수이므로 의도적으로 불투명합니다.

당신 in this question처럼, 추가 조사를 위해 description에서 assetSource에 필터링 술어를 사용할 수 있지만 순전히 학문적 인 운동이 될 것입니다.

+0

감사를 참조하십시오. 그런 식으로 할 수 있다는 것을 알고 흥미 롭지 만, 원래 내가 한 것을 성취 할 수있는 또 다른 방법을 찾아야합니다. – BlueVoodoo

0

은 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]

+1

불가능! "assetSource"는 3 일 수 있지만 PHAssetSourceType은 0, 1, 2, 4 일 수 있습니다. – mayqiyue

+0

@mayqiyue 분명히 asserSource는 다른 PHAssetSourceType – Ivan