Skip to content

Commit

Permalink
fixed up size of home button and centered profile img more on the card
Browse files Browse the repository at this point in the history
  • Loading branch information
s0phialiu committed Feb 18, 2024
1 parent 26ec61b commit 8413afb
Show file tree
Hide file tree
Showing 17 changed files with 12 additions and 11 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"images" : [
{
"filename" : "Question Mark.png",
"filename" : "Question Mark@1x.png",
"idiom" : "universal",
"scale" : "1x"
},
Expand Down
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"images" : [
{
"filename" : "Group 344.png",
"filename" : "ProfileCard1x.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Group 344 (1).png",
"filename" : "ProfileCard2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Group 344 (2).png",
"filename" : "ProfileCard3x.png",
"idiom" : "universal",
"scale" : "3x"
}
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ extension HIEventDetailViewController {
mapView.constrain(height: mapHeight)
mapView.layer.cornerRadius = 20
}

func setupCloseButton() {
view.addSubview(closeButton)
closeButton.addTarget(self, action: #selector(didSelectCloseButton(_:)), for: .touchUpInside)
Expand Down
14 changes: 7 additions & 7 deletions HackIllinois/ViewControllers/HIHomeViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,15 @@ extension HIHomeViewController {
func layoutLegendButton() {
view.addSubview(legendButton)

if UIDevice.current.userInterfaceIdiom != .pad {
legendButton.constrain(width: 25, height: 25)
} else {
legendButton.constrain(width: 50, height: 50)
}
let buttonSize: CGFloat = UIDevice.current.userInterfaceIdiom != .pad ? 30 : 50
let padding: CGFloat = UIDevice.current.userInterfaceIdiom != .pad ? 16 : 50

legendButton.constrain(width: buttonSize, height: buttonSize)
legendButton.translatesAutoresizingMaskIntoConstraints = false
legendButton.topAnchor.constraint(equalTo: bannerFrameView.topAnchor, constant: -2).isActive = true
legendButton.trailingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.trailingAnchor, constant: -15).isActive = true

// Increase the hit target area by adding padding
legendButton.topAnchor.constraint(equalTo: bannerFrameView.topAnchor, constant: -5).isActive = true
legendButton.trailingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.trailingAnchor, constant: -padding).isActive = true

legendButton.addTarget(self, action: #selector(didSelectLegendButton(_:)), for: .touchUpInside)
}
Expand Down

0 comments on commit 8413afb

Please sign in to comment.