Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feat] #68 - CustomAlert창 구현 #76

Merged
merged 14 commits into from
Jul 15, 2022
Merged

Conversation

0inn
Copy link
Contributor

@0inn 0inn commented Jul 15, 2022

🔥 Pull requests

⛳️ 작업한 브랜치

👷 작업한 내용

  • 커스텀 알림창 구현
  • 로그아웃 / 리뷰 작성 / 회원탈퇴 구현
    func makeAlert(alertType: AlertType = .logoutAlert,
                   title: String?,
                   subtitle: String?,
                   okAction: (() -> Void)? ) {
        
        let alertVC = ModuleFactory.resolve().makeHelfmeAlertVC()
        
        alertVC.alertType = alertType
        if let title = title {
            alertVC.alertTitle = title
        }
        if let subtitle = subtitle {
            alertVC.alertContent = subtitle
        }
        alertVC.okAction = okAction
        alertVC.modalTransitionStyle = .crossDissolve
        alertVC.modalPresentationStyle = .overCurrentContext
        present(alertVC, animated: true)
    }

🚨 참고 사항

지훈 선생님 감사합니다 ^^

사용할 VC에서 아래와 같이 함수 선언해서 사용가능합니다 ~!

makeAlert(alertType: .withdrawalAlert,
         title: I18N.HelfmeAlert.withdrawal,
         subtitle: I18N.HelfmeAlert.withdrawalContent) {
    // 원하는 Action 처리
    // Ex.
    self.present(SearchVC(), animated: false)
}
  1. alertType에 .logoutAlert / .deleteReviewAlert / .withdrawalAlert
  2. title 및 subtitle 입력 (만약 해당 값 없는 경우 nil 넣어주세요 ~!)
    I18N.HelfmeAlert에 Alert관련 StringLiterals 넣어놨으니 참고해서 사용해주세요 !
  3. 클릭 시, 이벤트 처리해주세요 ~

📸 스크린샷

기능 스크린샷
로그아웃
리뷰 삭제
회원 탈퇴

📟 관련 이슈

@0inn 0inn added Feat 새로운 기능 구현 ☁️Jenny labels Jul 15, 2022
@0inn 0inn added this to In progress in HeathFoodMe via automation Jul 15, 2022
@0inn 0inn self-assigned this Jul 15, 2022
Copy link
Member

@L-j-h-c L-j-h-c left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

캬 멋지네요 고생하셨습니다~!

Comment on lines 76 to 80
private func setAlertView(_ logout: Bool, _ deleteReview: Bool, _ withdrawal: Bool) {
logoutAlertView.isHidden = logout
reviewDeleteAlertView.isHidden = deleteReview
withdrawalAlertView.isHidden = withdrawal
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

p4;

요런 친구들은 파라미터 남겨두는게 가독성에 좋을 것 같아요~

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

넵 ~!!

Copy link
Member

@0lynny 0lynny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

굿 걸

@0inn 0inn merged commit 7fe8a84 into Health-Food-Me:develop Jul 15, 2022
HeathFoodMe automation moved this from In progress to Done Jul 15, 2022
@0inn 0inn deleted the feature/#68 branch July 15, 2022 10:06
Copy link
Member

@i-colours-u i-colours-u left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

깔끔하네요 ^_^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feat 새로운 기능 구현 ☁️Jenny
Projects
Development

Successfully merging this pull request may close these issues.

[Feat] CustomAlert창 구현
4 participants