有时我会在 iPhoneX 上看到 CNContactPickerViewController 位置错误的导航栏。
如何解决这个问题?
源代码如下所示。
- (void)showContactPicker {
if (_contactPicker) {
[_contactPicker removeFromParentViewController];
_contactPicker = nil;
}
_contactPicker = [[CNContactPickerViewController alloc] init];
_contactPicker.delegate = self;
_contactPicker.displayedPropertyKeys = @[CNContactPhoneNumbersKey];
[self presentViewController:_contactPicker animated:YES completion:nil];
}
很抱歉我不能上传图片,因为我没有足够的声誉......