CNContactViewController iOS 13放弃消息和键盘 [英] CNContactViewController iOS 13 Discard Message and Keyboard

查看:55
本文介绍了CNContactViewController iOS 13放弃消息和键盘的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在iOS 13上,我似乎无法使用CNContactViewController.这是我正在使用的代码:

on iOS 13 it seems I cannot use CNContactViewController. This is the code I'm using:

 func showCNContactViewController(inVC vc: UIViewController, cncontact: CNContact, contact: Contact? = nil) {
        self.contact = contact
        self.mode = .editing

        let store = CNContactStore()
        let contactVC = CNContactViewController(forNewContact: cncontact)
        contactVC.delegate = self
        contactVC.allowsActions = false
        contactVC.contactStore = store
        contactVC.shouldShowLinkedContacts = true

        contactVC.title = cncontact.givenName
        let contactNC = UINavigationController(rootViewController: contactVC)
        vc.present(contactNC, animated: true, completion: nil)
    }

使用此方法我会收到一个奇怪的放弃"消息,如果用户点击任何字段,它将显示键盘,并且该消息位于键盘下方,因此,即使不使用滑动"手势下移,用户也无法解除该消息.我到处都在搜索,但确实找到了解决键盘问题的方法,但没有发现有人用丢弃消息报告此问题.

Using this I'm getting a weird Discard Message and If the user taps on any field it will present the keyboard and the message is below the keyboard thus the user can't even dismiss this without using the Swipe gesture to go down. I've been searching everywhere and I did found workaround to the keyboard problem but I didn't found anyone reporting this issue with the discard message.

推荐答案

您的项目缺少 Localizable.strings 文件(该文件可以为空,但应存在于项目中).

Your project is missing Localizable.strings file (it can be empty, but it should exist in the project).

字符串将再次变得可读:)

Strings will become human readable again :)

这篇关于CNContactViewController iOS 13放弃消息和键盘的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆