Skip to content

Commit 8cef311

Browse files
author
Momo Ozawa
committed
Refactor: reposition the spotlight for the site icon
Previously, the spotlight was pinned to the bottom right corner of the site icon view. However, with the updated BlogHeaderDetailView, the spotlight gets cut off at the bottom. To resolve this issue, I respositioned the spotlight to appear on the top left corner.
1 parent f6b6828 commit 8cef311

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

WordPress/Classes/ViewRelated/Blog/Blog Details/Detail Header/SiteIconView.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ class SiteIconView: UIView {
44
static let imageSize: CGFloat = 64
55
static let borderRadius: CGFloat = 4
66
static let imageRadius: CGFloat = 2
7-
static let spotlightOffset: CGFloat = -8
7+
static let spotlightOffset: CGFloat = 8
88
}
99

1010
/// Whether or not to show the spotlight animation to illustrate tapping the icon.
@@ -92,8 +92,8 @@ class SiteIconView: UIView {
9292
addSubview(spotlightView)
9393

9494
NSLayoutConstraint.activate([
95-
trailingAnchor.constraint(equalTo: spotlightView.trailingAnchor, constant: Constants.spotlightOffset),
96-
bottomAnchor.constraint(equalTo: spotlightView.bottomAnchor, constant: Constants.spotlightOffset)
95+
leadingAnchor.constraint(equalTo: spotlightView.leadingAnchor, constant: Constants.spotlightOffset),
96+
topAnchor.constraint(equalTo: spotlightView.topAnchor, constant: Constants.spotlightOffset)
9797
])
9898

9999
pinSubviewToAllEdges(button)

0 commit comments

Comments
 (0)