UIActivityViewController whatsapp 共享对话框白色文本背景
UIActivityViewController whatsapp share dialog white text background
我正在使用以下代码分享一些内容。当我选择 whatsapp 选项时,我看到文本后面有白色背景。我完全迷路了,因为 UIActivityController 处理呈现共享对话框。知道如何去除白色背景吗?
let vc = UIActivityViewController(activityItems: [text, url], applicationActivities: [])
self.present(vc, animated: true)
出于某种原因,WhatsApp 界面似乎将白色背景颜色应用于 UILabel。你可以试一试:
let vc = UIActivityViewController(activityItems: [text, url], applicationActivities: [])
UILabel.appearance(whenContainedInInstancesOf: [UIView.self]).backgroundColor = .clear
self.present(vc, animated: true)
我正在使用以下代码分享一些内容。当我选择 whatsapp 选项时,我看到文本后面有白色背景。我完全迷路了,因为 UIActivityController 处理呈现共享对话框。知道如何去除白色背景吗?
let vc = UIActivityViewController(activityItems: [text, url], applicationActivities: [])
self.present(vc, animated: true)
出于某种原因,WhatsApp 界面似乎将白色背景颜色应用于 UILabel。你可以试一试:
let vc = UIActivityViewController(activityItems: [text, url], applicationActivities: [])
UILabel.appearance(whenContainedInInstancesOf: [UIView.self]).backgroundColor = .clear
self.present(vc, animated: true)