Could we show data in ios editor/CNContactViewController instead only show blank textfields?
for example, when I open CNContactViewController I want the name to be filled before user type anything
Yes, It is possible. Using viewControllerForNewContact: method of CNContactViewController, you can pass a CNContact object.
So in order to show name as filled in view, create a contact object with name and pass to viewControllerForNewContact:
CNMutableContact *pNewContact = [[CNMutableContact alloc] init];
pNewContact.givenName = @"My Name";
CNContactViewController *pNewContactVC = [CNContactViewController viewControllerForNewContact:pNewContact];
UINavigationController *pNavController = [[UINavigationController alloc] initWithRootViewController:pNewContactVC];
[self presentViewController:pNavController animated:YES
completion:nil];
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.