Make link preview background opaque
This commit is contained in:
parent
6d7c9fd553
commit
08e0c3769f
|
@ -334,6 +334,7 @@ extension ContentTextView: UIContextMenuInteractionDelegate {
|
||||||
// Create a dummy containerview for the snapshot view, since using a view with a CALayer mask and UIPreviewParameters(textLineRects:)
|
// Create a dummy containerview for the snapshot view, since using a view with a CALayer mask and UIPreviewParameters(textLineRects:)
|
||||||
// causes the mask to be ignored. See FB7832297
|
// causes the mask to be ignored. See FB7832297
|
||||||
let snapshotContainer = UIView(frame: snapshot.bounds)
|
let snapshotContainer = UIView(frame: snapshot.bounds)
|
||||||
|
snapshotContainer.backgroundColor = .systemBackground
|
||||||
snapshotContainer.addSubview(snapshot)
|
snapshotContainer.addSubview(snapshot)
|
||||||
|
|
||||||
let preview = UITargetedPreview(view: snapshotContainer, parameters: parameters, target: target)
|
let preview = UITargetedPreview(view: snapshotContainer, parameters: parameters, target: target)
|
||||||
|
|
Loading…
Reference in New Issue