【发布时间】:2016-12-01 08:07:06
【问题描述】:
我想检查 latestObject 是什么类型。这是一些代码:
allMedia = PHAsset.fetchAssetsWithOptions(fetchOptions)
let allPhotos = PHAsset.fetchAssetsWithMediaType(.Image, options: fetchOptions)
let allVideo = PHAsset.fetchAssetsWithMediaType(.Video, options: fetchOptions)
print("Found \(allMedia.count) media")
print("Found \(allPhotos.count) images")
print("Found \(allVideo.count) videos")
let latestObject: AnyObject! = allMedia.lastObject
// How to check what type latestObject is?
// I think something with mediaType but how is it exactly going?
【问题讨论】: