mirror of
https://github.com/MessageKit/MessageKit.git
synced 2026-02-06 19:03:19 +00:00
Merge pull request #239 from MessageKit/ar/equal
Fix MediaMessageCell’s off center play button
This commit is contained in:
@@ -55,6 +55,9 @@ The changelog for `MessageKit`. Also see the [releases](https://github.com/Messa
|
||||
- `scrollIndicatorInsets` to match the insets of the `MessagesCollectionView`.
|
||||
[#174](https://github.com/MessageKit/MessageKit/pull/174) by [@etoledom](https://github.com/etoledom).
|
||||
|
||||
- `MediaMessageCell` had an offset `PlayButtonView` that was being constrained to the cell and not the message container.
|
||||
[#239](https://github.com/MessageKit/MessageKit/pull/239) by [@SirArkimedes](https://github.com/SirArkimedes).
|
||||
|
||||
### Changed
|
||||
|
||||
- **Breaking Change** `snapshotOptionsForLocation` method is now part of `LocationMessageDisplayDelegate`.
|
||||
|
||||
@@ -40,8 +40,8 @@ open class MediaMessageCell: MessageCollectionViewCell<UIImageView> {
|
||||
private func setupConstraints() {
|
||||
playButtonView.translatesAutoresizingMaskIntoConstraints = false
|
||||
|
||||
let centerX = playButtonView.centerXAnchor.constraint(equalTo: centerXAnchor)
|
||||
let centerY = playButtonView.centerYAnchor.constraint(equalTo: centerYAnchor)
|
||||
let centerX = playButtonView.centerXAnchor.constraint(equalTo: messageContainerView.centerXAnchor)
|
||||
let centerY = playButtonView.centerYAnchor.constraint(equalTo: messageContainerView.centerYAnchor)
|
||||
let width = playButtonView.widthAnchor.constraint(equalToConstant: playButtonView.bounds.width)
|
||||
let height = playButtonView.heightAnchor.constraint(equalToConstant: playButtonView.bounds.height)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user