forked from shadowfacts/Tusker
parent
5cf2bc4fbf
commit
75f0d12c82
|
@ -640,7 +640,7 @@ extension ConversationMainStatusCollectionViewCell: UIPointerInteractionDelegate
|
||||||
return defaultRegion
|
return defaultRegion
|
||||||
} else if let button = interaction.view as? UIButton,
|
} else if let button = interaction.view as? UIButton,
|
||||||
actionButtons.contains(button) {
|
actionButtons.contains(button) {
|
||||||
var rect = button.convert(button.imageView!.bounds, to: button.imageView!)
|
var rect = button.convert(button.imageView!.bounds, from: button.imageView!)
|
||||||
rect = rect.insetBy(dx: -24, dy: -24)
|
rect = rect.insetBy(dx: -24, dy: -24)
|
||||||
return UIPointerRegion(rect: rect)
|
return UIPointerRegion(rect: rect)
|
||||||
}
|
}
|
||||||
|
@ -654,8 +654,8 @@ extension ConversationMainStatusCollectionViewCell: UIPointerInteractionDelegate
|
||||||
} else if let button = interaction.view as? UIButton,
|
} else if let button = interaction.view as? UIButton,
|
||||||
actionButtons.contains(button) {
|
actionButtons.contains(button) {
|
||||||
let preview = UITargetedPreview(view: button.imageView!)
|
let preview = UITargetedPreview(view: button.imageView!)
|
||||||
var rect = button.convert(button.imageView!.bounds, to: button.imageView!)
|
var rect = button.convert(button.imageView!.bounds, from: button.imageView!)
|
||||||
rect = rect.insetBy(dx: -24, dy: -24)
|
rect = rect.insetBy(dx: -8, dy: -8)
|
||||||
return UIPointerStyle(effect: .highlight(preview), shape: .roundedRect(rect))
|
return UIPointerStyle(effect: .highlight(preview), shape: .roundedRect(rect))
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Reference in New Issue