Skip to content

Commit

Permalink
Fix: guard문 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
GeonH0 committed Jun 25, 2024
1 parent 79fb270 commit 0d1d0ce
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,16 @@ class MainTabBarController: UITabBarController, UITabBarControllerDelegate {
addButton.heightAnchor.constraint(equalToConstant: 64)
])
}

@objc private func didTapActionButton() {
let alert = UIAlertController(title: "게시물 작성", message: "어떤 게시물을 작성하실 건가요?", preferredStyle: .actionSheet)
alert.addAction(UIAlertAction(title: "Coffee", style: .default, handler: { [weak self] _ in
guard let self = self else { return }
guard let self else { return }
let addRecipeVC = AddRecipeViewController(recipeType: .coffee)
self.navigationController?.pushViewController(addRecipeVC, animated: true)
}))
alert.addAction(UIAlertAction(title: "Dessert", style: .default, handler: { [weak self] _ in
guard let self = self else { return }
guard let self else { return }
let addRecipeVC = AddRecipeViewController(recipeType: .dessert)
self.navigationController?.pushViewController(addRecipeVC, animated: true)
}))
Expand Down

0 comments on commit 0d1d0ce

Please sign in to comment.