Skip to content

Commit

Permalink
Merge pull request #50 from yangsubinn/feat/#49-SettingUI
Browse files Browse the repository at this point in the history
[Feat] #49 - 설정 뷰 UI 구현
  • Loading branch information
yangsubinn authored Dec 18, 2022
2 parents 83b4bf6 + 816ba0b commit f57a5d5
Show file tree
Hide file tree
Showing 20 changed files with 704 additions and 2 deletions.
16 changes: 16 additions & 0 deletions SOPT-Stamp-iOS/Projects/Core/Sources/Literals/StringLiterals.swift
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,20 @@ public struct I18N {

public static let deleteTitle = "달성한 미션을 삭제하시겠습니까?"
}

public struct Setting {
public static let setting = "설정"
public static let myinfo = "내 정보"
public static let bioEdit = "한 마디 편집"
public static let passwordEdit = "비밀번호 편집"
public static let nicknameEdit = "닉네임 변경"
public static let serviceUsagePolicy = "서비스 이용방침"
public static let personalInfoPolicy = "개인정보처리방침"
public static let serviceTerm = "서비스 이용 약관"
public static let suggestion = "서비스 의견 제안"
public static let mission = "미션"
public static let resetMission = "미션 초기화"
public static let logout = "로그아웃"
public static let withdraw = "탈퇴하기"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public protocol UICollectionViewRegisterable {
static func register(target: UICollectionView)
}

public protocol UIICollectionReusableViewRegisterable {
public protocol UICollectionReusableViewRegisterable {
static var isFromNib: Bool { get }
static func register(target: UICollectionView, isHeader: Bool)
}
Expand All @@ -28,7 +28,7 @@ extension UICollectionViewRegisterable where Self: UICollectionViewCell {
}
}

extension UIICollectionReusableViewRegisterable where Self: UICollectionReusableView {
extension UICollectionReusableViewRegisterable where Self: UICollectionReusableView {
public static func register(target: UICollectionView, isHeader: Bool) {
if self.isFromNib {
if isHeader {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
//
// SettingRepository.swift
// Presentation
//
// Created by 양수빈 on 2022/12/17.
// Copyright © 2022 SOPT-Stamp-iOS. All rights reserved.
//

import Combine

import Core
import Domain
import Network

public class SettingRepository {

private let networkService: UserService
private let cancelBag = CancelBag()

public init(service: UserService) {
self.networkService = service
}
}

extension SettingRepository: SettingRepositoryInterface {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//
// SettingTransform.swift
// Presentation
//
// Created by 양수빈 on 2022/12/17.
// Copyright © 2022 SOPT-Stamp-iOS. All rights reserved.
//

import Foundation

import Domain
import Network

extension SettingEntity {

public func toDomain() -> SettingModel {
return SettingModel.init()
}
}
16 changes: 16 additions & 0 deletions SOPT-Stamp-iOS/Projects/Domain/Sources/Model/SettingModel.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//
// SettingModel.swift
// Presentation
//
// Created by 양수빈 on 2022/12/17.
// Copyright © 2022 SOPT-Stamp-iOS. All rights reserved.
//

import Foundation

public struct SettingModel {

public init() {

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//
// SettingRepositoryInterface.swift
// Presentation
//
// Created by 양수빈 on 2022/12/17.
// Copyright © 2022 SOPT-Stamp-iOS. All rights reserved.
//

import Combine

public protocol SettingRepositoryInterface {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
//
// SettingUseCase.swift
// Presentation
//
// Created by 양수빈 on 2022/12/17.
// Copyright © 2022 SOPT-Stamp-iOS. All rights reserved.
//

import Combine

public protocol SettingUseCase {

}

public class DefaultSettingUseCase {

private let repository: SettingRepositoryInterface
private var cancelBag = Set<AnyCancellable>()

public init(repository: SettingRepositoryInterface) {
self.repository = repository
}
}

extension DefaultSettingUseCase: SettingUseCase {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "icLeftArrow.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "icLeftArrow@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "icLeftArrow@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//
// SettingEntity.swift
// Presentation
//
// Created by 양수빈 on 2022/12/17.
// Copyright © 2022 SOPT-Stamp-iOS. All rights reserved.
//

import Foundation

public struct SettingEntity {

}
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,12 @@ extension MissionListVC {
extension MissionListVC {

private func bindViewModels() {
naviBar.rightButtonTapped
.asDriver()
.sink { _ in
self.pushToSettingVC()
}.store(in: self.cancelBag)

let input = MissionListViewModel.Input()
let output = self.viewModel.transform(from: input, cancelBag: self.cancelBag)
}
Expand Down Expand Up @@ -172,6 +178,11 @@ extension MissionListVC {
dataSource.apply(snapshot, animatingDifferences: false)
self.view.setNeedsLayout()
}

private func pushToSettingVC() {
let settingVC = self.factory.makeSettingVC()
self.navigationController?.pushViewController(settingVC, animated: true)
}
}

// MARK: - UICollectionViewDelegate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ public protocol ModuleFactoryInterface {
func makeMissionCompletedVC(starLevel: StarViewLevel) -> MissionCompletedVC
func makeAlertVC(title: String, customButtonTitle: String) -> AlertVC
func makeRankingVC() -> RankingVC
func makeSettingVC() -> SettingVC
}
Loading

0 comments on commit f57a5d5

Please sign in to comment.