Skip to content

Commit

Permalink
Fix: FavoriteAdCell touch area for more button (#488)
Browse files Browse the repository at this point in the history
* Add insets to more button

* Remove trailing constraint for more button
  • Loading branch information
bstien authored Jul 31, 2019
1 parent 3d87a61 commit 7bf9d09
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ public class FavoriteAdTableViewCell: UITableViewCell {
button.imageView?.contentMode = .scaleAspectFit
button.tintColor = .stone
button.addTarget(self, action: #selector(moreButtonTapped), for: .touchUpInside)
button.contentEdgeInsets = UIEdgeInsets(vertical: 10, horizontal: 8)
return button
}()

Expand Down Expand Up @@ -123,14 +124,14 @@ public class FavoriteAdTableViewCell: UITableViewCell {
statusRibbon.topAnchor.constraint(equalTo: contentView.topAnchor, constant: .mediumSpacing),
statusRibbon.trailingAnchor.constraint(equalTo: contentView.trailingAnchor, constant: -.mediumSpacing),

moreButton.widthAnchor.constraint(equalToConstant: 24),
moreButton.heightAnchor.constraint(equalToConstant: 24),
moreButton.trailingAnchor.constraint(equalTo: contentView.trailingAnchor, constant: -.mediumSpacing),
moreButton.widthAnchor.constraint(equalToConstant: 40),
moreButton.heightAnchor.constraint(equalToConstant: 44),
moreButton.trailingAnchor.constraint(equalTo: contentView.trailingAnchor),
moreButton.centerYAnchor.constraint(equalTo: contentView.centerYAnchor),

stackView.topAnchor.constraint(equalTo: contentView.topAnchor, constant: 24),
stackView.leadingAnchor.constraint(equalTo: remoteImageView.trailingAnchor, constant: .mediumLargeSpacing),
stackView.trailingAnchor.constraint(lessThanOrEqualTo: moreButton.leadingAnchor, constant: -.mediumSpacing),
stackView.trailingAnchor.constraint(lessThanOrEqualTo: moreButton.leadingAnchor),
stackView.bottomAnchor.constraint(equalTo: contentView.bottomAnchor, constant: -24),

addressLabel.trailingAnchor.constraint(lessThanOrEqualTo: statusRibbon.leadingAnchor, constant: -.mediumSpacing)
Expand Down

0 comments on commit 7bf9d09

Please sign in to comment.