Skip to content

Commit

Permalink
[#196] FIX: Conflict 해결
Browse files Browse the repository at this point in the history
  • Loading branch information
SuwonPabby committed Aug 21, 2023
1 parent 0d54a1f commit d0cdb9a
Show file tree
Hide file tree
Showing 9 changed files with 60 additions and 43 deletions.
1 change: 1 addition & 0 deletions AssetKit/Sources/AssetKit/Generated/Images+Generated.swift
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ public enum Images {
public static let icCheckYellow = ImageAsset(name: "ic_check_yellow")
public static let icDetailProfile = ImageAsset(name: "ic_detail_profile")
public static let icEditProfile = ImageAsset(name: "ic_edit_profile")
public static let icImageDownload = ImageAsset(name: "ic_image_download")
public static let icSetting = ImageAsset(name: "ic_setting")
public static let icSettingEmpty = ImageAsset(name: "ic_setting_empty")
public static let icShow = ImageAsset(name: "ic_show")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "download.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "[email protected]",
"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
Expand Up @@ -8,21 +8,16 @@
import UIKit
import RxSwift
import RxCocoa
import HousUIComponent

final class ProfileDetailNavigationBarView: UIView {
final class ProfileDetailNavigationBarView: NavBarWithBackButtonView {

private let disposeBag: DisposeBag = DisposeBag()
let viewActionControlSubject = PublishSubject<ProfileDetailActionControl>()
var isFromTypeTest: Bool = false

private lazy var navigationBackButton = UIButton().then {
$0.setImage(Images.icBack.image, for: .normal)
}

private lazy var testCompleteButton = UIButton().then {
$0.setTitle("완료", for: .normal)
$0.setTitleColor(Colors.blue.color, for: .normal)
$0.titleLabel?.font = Fonts.SpoqaHanSansNeo.medium.font(size: 16)
private let imageDownloadButton = UIButton().then {
$0.setImage(Images.icImageDownload.image, for: .normal)
}

private let titleName = UILabel().then {
Expand All @@ -32,60 +27,48 @@ final class ProfileDetailNavigationBarView: UIView {
$0.textAlignment = .center
}

override init(frame: CGRect) {
super.init(frame: frame)
}

required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}

convenience init(isFromTypeTest: Bool) {
self.init(frame: .zero)
init(title: String = "",
rightButtonText: String = "",
rightButtonImage: UIImage? = nil,
isSeparatorLineHidden: Bool = true,
isFromTypeTest: Bool
) {
super.init(title: title, rightButtonText: rightButtonText,
rightButtonImage: rightButtonImage,
isSeparatorLineHidden: isSeparatorLineHidden)
self.isFromTypeTest = isFromTypeTest
render()
setup()
transferToViewController()
}

required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}

private func setup() {
self.backgroundColor = .white
}

private func render() {
self.addSubView(titleName)

titleName.snp.makeConstraints { make in
make.centerX.equalToSuperview()
make.centerY.equalToSuperview().offset(2)
}

if self.isFromTypeTest {
self.addSubView(testCompleteButton)

testCompleteButton.snp.makeConstraints { make in
make.centerY.equalToSuperview()
make.trailing.equalToSuperview().inset(32)
}
} else {
self.addSubView(navigationBackButton)
self.addSubview(imageDownloadButton)

navigationBackButton.snp.makeConstraints {make in
make.centerY.equalToSuperview()
make.leading.equalToSuperview().inset(24)
}
imageDownloadButton.snp.makeConstraints { make in
make.centerY.equalToSuperview()
make.trailing.equalToSuperview().inset(24)
}
}

private func transferToViewController() {
self.navigationBackButton.rx.tap
self.backButton.rx.tap
.bind { [weak self] in
guard let self = self else { return }
self.viewActionControlSubject.onNext(.didTabBack)
}
.disposed(by: disposeBag)

self.testCompleteButton.rx.tap
self.imageDownloadButton.rx.tap
.bind { [weak self] in
guard let self = self else { return }
self.viewActionControlSubject.onNext(.didTabBack)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import UIKit
import RxSwift
import RxCocoa
import Then
import HousUIComponent

final class ProfileAlarmSettingViewController: BaseViewController, LoadingPresentable {

Expand All @@ -31,8 +32,13 @@ final class ProfileAlarmSettingViewController: BaseViewController, LoadingPresen

private let navigationBarView = NavBarWithBackButtonView(
title: "알림",
<<<<<<< Updated upstream
rightButtonText: ""
)
=======
rightButtonText: "",
isSeparatorLineHidden: false)
>>>>>>> Stashed changes
private let alarmSettingCollectionView: UICollectionView = {
let layout = UICollectionViewFlowLayout()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ final class ProfileDetailViewController: BaseViewController, LoadingPresentable

// MARK: UI Components

private lazy var navigationBarView = ProfileDetailNavigationBarView(isFromTypeTest: self.isFromTypeTest)
private let navigationBarView = ProfileDetailNavigationBarView(
title: "성향 설명",
rightButtonText: "",
isFromTypeTest: true
)

private let profileDetailCollectionView: UICollectionView = {
let layout = UICollectionViewFlowLayout()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ final class ProfileSettingViewController: UIViewController {

private let navigationBarView = NavBarWithBackButtonView(
title: "설정",
rightButtonText: ""
)
rightButtonText: "",
isSeparatorLineHidden: false)

private let settingListStackView = UIStackView().then {
$0.alignment = .fill
Expand Down

0 comments on commit d0cdb9a

Please sign in to comment.