ASSwiftContactBook 1.1.2

ASSwiftContactBook 1.1.2

测试已测试
语言语言 SwiftSwift
许可证 MIT
发布最后发布2017年12月
SwiftSwift 版本3.0
SPM支持 SPM

Anton Stremovskiy维护。



ASSwiftContactBook

用 Swift 编写的 ContactBook 选择器

支持 iOS 9 及更高版本

安装

pod 'ASSwiftContactBook'

用法

 // init contact picker with custom desire subtitle
 
 func showContactPicker {
    
  let contactsVC = ASContactPicker(subTitle: .phone, multipleSelection: true, shouldOpenContactDetail: true)
  let nav = UINavigationController(rootViewController: contactsVC)
  self.present(nav, animated: true, completion: nil)
 
 
   // init handler for selected contacts
   contacts.didSelectContacts = { contacts in
       contacts.forEach { contact in debugPrint("\(contact.firstName) \(contact.lastName)") }
   }

   // init handler for single contact, in case you choosed single selection
   contacts.didSelectSingleContact = { contact in
       debugPrint("\(contact.firstName) \(contact.phones[0].digits)")
   }
}

选项

  • .phone
  • .email
  • .birthday
  • .organization

DEMO

Screenshot

TODO

  • [x] 创建详细联系人视图
  • [x] 实现单联系人选择
  • [x] 添加拨打电话/编写电子邮件动作

作者

@antons81 - Anton Stremovskiy