有人可以告诉我,我怎样才能从被选中的Swift人物中获取图像?我使用ABPeoplePickerNavigationController ..
答案 0 :(得分:1)
if ABPersonHasImageData(person ) {
let profilePicture = UIImage(data: ABPersonCopyImageDataWithFormat(person, kABPersonImageFormatOriginalSize).takeRetainedValue())!
let profilePictureThumbnail = UIImage(data: ABPersonCopyImageDataWithFormat(person, kABPersonImageFormatThumbnail).takeRetainedValue())!
println("\(profilePicture)")
println("\(profilePictureThumbnail)")
}