Skip to content

Commit

Permalink
✨[FEAT] #146 - 플로팅 버튼 UI 구현
Browse files Browse the repository at this point in the history
  • Loading branch information
jumining committed Jan 19, 2023
1 parent 5a62e56 commit 60eb256
Showing 1 changed file with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ final class LikedStudiosViewController: UIViewController {
return collectionView
}()

private let upButton = UIButton().then {
$0.setImage(Asset.btnUp.image, for: .normal)
}

// MARK: - Life Cycle
override func viewDidLoad() {
super.viewDidLoad()
Expand Down Expand Up @@ -56,7 +60,8 @@ extension LikedStudiosViewController {

private func setUpNavigationBar() {
self.navigationController?.navigationBar.isHidden = true
navigationBar.popViewController = { self.navigationController?.popViewController(animated: true) }
navigationBar.popViewController = { self.navigationController?.popViewController(animated: true)
}
}

private func registerCell() {
Expand All @@ -74,6 +79,7 @@ extension LikedStudiosViewController {
private func setLayout() {
layoutNavigaionBar()
layoutStudiosCollectionView()
layoutFloatingUpButton()
}

private func layoutNavigaionBar() {
Expand All @@ -92,6 +98,14 @@ extension LikedStudiosViewController {
$0.leading.bottom.trailing.equalToSuperview()
}
}

private func layoutFloatingUpButton() {
view.addSubview(upButton)
upButton.snp.makeConstraints {
$0.bottom.equalToSuperview().inset(36)
$0.trailing.equalToSuperview().inset(18)
}
}
}

// MARK: - UICollectionViewDelegate
Expand Down

0 comments on commit 60eb256

Please sign in to comment.