working contact selection
This commit is contained in:
@@ -10,7 +10,9 @@ import Contacts
|
|||||||
|
|
||||||
struct ContactPickerView: View {
|
struct ContactPickerView: View {
|
||||||
@Binding var showPicker: Bool
|
@Binding var showPicker: Bool
|
||||||
|
// updates the parent view for it to do something with the new contact
|
||||||
@Binding var selectedContact: CNContact?
|
@Binding var selectedContact: CNContact?
|
||||||
|
|
||||||
var contacts: [String: [CNContact]] = loadContactsGrouped()
|
var contacts: [String: [CNContact]] = loadContactsGrouped()
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ struct ContactsView: View {
|
|||||||
Button(action: {
|
Button(action: {
|
||||||
self.showPicker = true
|
self.showPicker = true
|
||||||
}, label: {
|
}, label: {
|
||||||
Label("Add Contacts", systemImage: "plus.circle")
|
Label("Add Contacts", systemImage: "plus")
|
||||||
.frame(width: 50, height: 50, alignment: .center)
|
.frame(width: 50, height: 50, alignment: .center)
|
||||||
.labelStyle(.iconOnly)
|
.labelStyle(.iconOnly)
|
||||||
.font(.largeTitle)
|
.font(.largeTitle)
|
||||||
|
|||||||
Reference in New Issue
Block a user