objective-c - 从通讯录中获取图片的裁剪版本
<p><p>我使用以下代码从通讯录中加载联系人图片:</p>
<pre><code>- (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker shouldContinueAfterSelectingPerson:(ABRecordRef)person property:(ABPropertyID)property identifier:(ABMultiValueIdentifier)identifier{
UIImage *image = ;
return NO;
}
</code></pre>
<p>但是,此代码返回存储的完整图像,而不是显示在不同位置(如地址簿)的裁剪版本。</p></p>
<br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
<p><p>我在这里找到了答案:<a href="https://stackoverflow.com/a/6953492/784318" rel="noreferrer noopener nofollow">https://stackoverflow.com/a/6953492/784318</a> </p>
<pre><code>NSData *imageData = (__bridge NSData*)ABPersonCopyImageDataWithFormat(person, kABPersonImageFormatThumbnail);
UIImage *image = ;
</code></pre></p>
<p style="font-size: 20px;">关于objective-c - 从通讯录中获取图片的裁剪版本,我们在Stack Overflow上找到一个类似的问题:
<a href="https://stackoverflow.com/questions/8972140/" rel="noreferrer noopener nofollow" style="color: red;">
https://stackoverflow.com/questions/8972140/
</a>
</p>
页:
[1]