Skip to content

Commit 90c9f99

Browse files
committed
[#94] 푸시 알림 토글 스위치 토스트 메시지 연결
1 parent a1cab32 commit 90c9f99

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

EATSSU_MVC/EATSSU_MVC/Sources/Presentation/MyPage/ViewController/MyPageViewController.swift

+2
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,8 @@ extension MyPageViewController: UITableViewDelegate {
206206
if switchState {
207207
print("푸시 알림을 발송합니다.")
208208
NotificationManager.shared.scheduleWeekday11AMNotification()
209+
// TODO: PM으로부터 전달받은 메시지를 입력합니다.
210+
view.showToast(message: TextLiteral.MyPage.pushNotificationToastMessage)
209211
} else {
210212
print("푸시 알림을 발송하지 않습니다.")
211213
NotificationManager.shared.cancelWeekday11AMNotification()

EATSSU_MVC/EATSSU_MVC/Sources/Utility/Extension/UIView+.swift

+6-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,12 @@ extension UIView {
2323
}
2424

2525
extension UIView {
26-
func showToast(message: String) {
26+
27+
/// 파라미터로 입력받은 문자열을 토스트 메시지를 전달합니다.
28+
///
29+
/// - Parameters:
30+
/// - message: 토스트 메시지로 전달할 문자열
31+
public func showToast(message: String) {
2732
let toastLabel = UILabel()
2833
toastLabel.backgroundColor = UIColor.black.withAlphaComponent(0.6)
2934
toastLabel.textColor = UIColor.white

EATSSU_MVC/EATSSU_MVC/Sources/Utility/Literal/TextLiteral.swift

+4
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ enum TextLiteral {
7171
/// "마이페이지" 텍스트 리터럴
7272
enum MyPage {
7373

74+
// TODO: PM으로부터 받은 메시지로 교체합니다.
75+
/// "평일 오전 11시에 푸시 알림을 수신합니다.
76+
static let pushNotificationToastMessage: String = "평일 오전 11시에 푸시 알림을 수신합니다."
77+
7478
/// "푸시 알림 사용자 설정 접근 키"
7579
static let pushNotificationUserSettingKey: String = "pushNotificationUserSettingKey"
7680

0 commit comments

Comments
 (0)