Skip to content

Commit

Permalink
goalVC now also respects safe area (#495)
Browse files Browse the repository at this point in the history
goal view controller was not respecting the safe areas. This meant, for
example, that the graph was partially hidden behind the Dynamic Island.
  • Loading branch information
krugerk authored Oct 21, 2024
1 parent a4b2744 commit 693fa6c
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions BeeSwift/GoalViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,12 @@ class GoalViewController: UIViewController, UIScrollViewDelegate, DatapointTabl

self.view.addSubview(self.scrollView)
self.scrollView.snp.makeConstraints { (make) -> Void in
make.top.equalToSuperview()
make.left.equalTo(0)
make.right.equalTo(0)
make.bottom.equalTo(0)
make.top.equalTo(self.view.safeAreaLayoutGuide.snp.topMargin)
make.left.equalTo(self.view.safeAreaLayoutGuide.snp.leftMargin)
make.right.equalTo(self.view.safeAreaLayoutGuide.snp.rightMargin)
make.bottom.equalTo(self.view.safeAreaLayoutGuide.snp.bottomMargin)
}


self.scrollView.refreshControl = {
let refreshControl = UIRefreshControl()
refreshControl.addTarget(self, action: #selector(refreshButtonPressed), for: .valueChanged)
Expand Down

0 comments on commit 693fa6c

Please sign in to comment.