CNContactViewController calls its delegate method when exiting edit mode
| Originator: | buchanan.paul | ||
| Number: | rdar://32543402 | Date Originated: | June 2 2017 |
| Status: | Open | Resolved: | |
| Product: | Product Version: | ||
| Classification: | Reproducible: |
When pushed on a UINavigationController, CNContactViewController calls its delegate method contactViewController:didCompleteWithContact: when the user comes back from edit mode. This causes the presenting application to dismiss the view controller early. The dismissal should come when the user hits the back button. Sample app: https://github.com/paulBuchanan/CNContactViewControllerBug Steps to Reproduce: 1) Run the attached sample app on a simulator or device running iOS 10.3 2) Accept the contacts access prompt 3) Tap the "Push on Nav Stack Button" 4) Tap the "edit" button 5) Tap the "cancel" button 6) Delegate method is called, causing presenting application to dismiss the CNContactViewController Alternate steps: 1) Run the attached sample app on a simulator or device running iOS 10.3 2) Accept the contacts access prompt 3) Tap the "Push on Nav Stack Button" 4) Tap the "edit" button 5) Make an edit and tap the "Done" button 6) Delegate method is called, causing presenting application to dismiss the CNContactViewController When the user presses "cancel" or "Done" the contactViewController:didCompleteWithContact: delegate method is called, causing the presenting application to dismiss the CNContactViewController. If you compare with the iOS contacts app, the contact details screen is not dismissed when the user exists edit mode, instead, it is dismissed when the user taps "back" I would expect the contactViewController:didCompleteWithContact: to be called only when the "back" button is pressed. Expected Results: The contactViewController:didCompleteWithContact: delegate method is called only when the "back" button is pressed Observed Results: The contactViewController:didCompleteWithContact: delegate method is called both for the "back" button and when the user exits edit mode.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!