目录
目录README.md

SwiftUIContacts

SwiftUI wrapper of ContactsUI‘s CNContactPickerViewController. Eventually, I’ll add the rest of the framework.

To-Do’s

  • Port over macOS-exclusive ViewControllers (CNContactViewController‘s usage on macOS, and CNContactPicker).

Documentation

Documentation for SwiftUIContacts is hosted on Swift Package Index.

ContactPicker

ContactPicker supports four different selection modes and the mode is decided by which init you use:

  • A single contact
    • Use a @Binding of type CNContact? in the init
  • Multiple contacts
    • Use a @Binding of type [CNContact] in the init
  • A single property of a contact
    • Use a @Binding of type CNContactProperty? in the init
  • A single property from multiple contacts
    • Use a @Binding of type [CNContactProperty] in the init
.sheet(isPresented: $showSheet) {
    ContactPicker(selection: $selectedProperty,
                  displayedPropertyKeys: [.phoneNumbersKey]
    )
}
关于
61.0 KB
邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

©Copyright 2023 CCF 开源发展委员会
Powered by Trustie& IntelliDE 京ICP备13000930号