IOS13 CNMutableContact Bug

问题描述 投票:-3回答:1

我只是尝试用下面的代码调用函数

func bugVersionPressed() {

    let contact = CNMutableContact()
    contact.familyName = "aaaa"
    contact.givenName = "aaaa"
    contact.organizationName = "bbbb"
    let addContactVC = CNContactViewController(forNewContact: contact)

    let navController = UINavigationController(rootViewController: addContactVC)
    navController.view.backgroundColor = .red
    navController.modalPresentationStyle = .fullScreen
    self.present(navController, animated: true, completion: nil)
}

但是苹果似乎没有处理键盘解雇问题,我无法解雇键盘,也无法通过按“取消”键返回主页。

PIC1 :(在出现给CNContactViewController之前)Before present to CNContactViewController

PIC2 :(错误情况,键盘无法关闭)Bug Case, Keyboard Cannot dismiss

PIC3 :(希望如此,在单击“取消”时关闭键盘)Wish Case, Keyboard Dismiss while Clicked "Cancel"

[如果我找到了AppleStore应用https://apps.apple.com/cn/app/%E5%BE%AE%E5%95%86%E5%8A%A0%E7%B2%89%E5%AE%9D-%E5%85%8D%E6%B3%A8%E5%86%8C%E6%B7%BB%E5%8A%A0%E6%B4%BB%E7%B2%89-%E8%81%94%E7%B3%BB%E4%BA%BA%E5%A5%BD%E5%8F%8B%E8%87%AA%E5%8A%A8%E7%94%9F%E6%88%90/id475661774,但存在相同的问题。请告诉我该怎么办。非常感谢。

ios swift contacts
1个回答
0
投票
此问题在iOS 13中不会发生,但在iOS 13.1中会发生。我认为这是CNContactViewController的问题,而不是CNMutableContact。

很抱歉,由于苹果的框架,我不知道如何避免这种情况。将错误报告发送给Apple。

© www.soinside.com 2019 - 2024. All rights reserved.