如何将 CFArrayRef 设为 NSMutableArray
这是我创建 CFArrayRef 的代码。我想知道如何将其变成 NSMutableArray。我的 TableViewController 需要它。或者还有另一种方法可以在 TableViewController 中使用 CFArrayRef 吗?
ABAddressBookRef addressBook = ABAddressBookCreate();
CFArrayRef arrayOfAllPeople = ABAddressBookCopyArrayOfAllPeople(addressBook);
This is my Code to create the CFArrayRef. I want to know how to make it to an NSMutableArray. I need it for my TableViewController. Or is there another way to use the CFArrayRef in the TableViewController?
ABAddressBookRef addressBook = ABAddressBookCreate();
CFArrayRef arrayOfAllPeople = ABAddressBookCopyArrayOfAllPeople(addressBook);
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
CFArrayRef
是免费桥接到NSArray *
的,因此您可以将其转换为这样,然后创建一个可变副本:A
CFArrayRef
is toll-free bridged toNSArray *
, so you can cast it as such and then create a mutable copy:对于自动发布的版本,请使用
For an autoreleased version, use