diff --git a/AssetKit/Sources/AssetKit/Generated/Images+Generated.swift b/AssetKit/Sources/AssetKit/Generated/Images+Generated.swift index f08cba1b..0aa07e6a 100644 --- a/AssetKit/Sources/AssetKit/Generated/Images+Generated.swift +++ b/AssetKit/Sources/AssetKit/Generated/Images+Generated.swift @@ -144,6 +144,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") diff --git a/AssetKit/Sources/AssetKit/Resources/Images.xcassets/04-1_profile/ic_image_download.imageset/Contents.json b/AssetKit/Sources/AssetKit/Resources/Images.xcassets/04-1_profile/ic_image_download.imageset/Contents.json new file mode 100644 index 00000000..e5e0094d --- /dev/null +++ b/AssetKit/Sources/AssetKit/Resources/Images.xcassets/04-1_profile/ic_image_download.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "download.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "download@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "download@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/AssetKit/Sources/AssetKit/Resources/Images.xcassets/04-1_profile/ic_image_download.imageset/download.png b/AssetKit/Sources/AssetKit/Resources/Images.xcassets/04-1_profile/ic_image_download.imageset/download.png new file mode 100644 index 00000000..72d74662 Binary files /dev/null and b/AssetKit/Sources/AssetKit/Resources/Images.xcassets/04-1_profile/ic_image_download.imageset/download.png differ diff --git a/AssetKit/Sources/AssetKit/Resources/Images.xcassets/04-1_profile/ic_image_download.imageset/download@2x.png b/AssetKit/Sources/AssetKit/Resources/Images.xcassets/04-1_profile/ic_image_download.imageset/download@2x.png new file mode 100644 index 00000000..ba0269e5 Binary files /dev/null and b/AssetKit/Sources/AssetKit/Resources/Images.xcassets/04-1_profile/ic_image_download.imageset/download@2x.png differ diff --git a/AssetKit/Sources/AssetKit/Resources/Images.xcassets/04-1_profile/ic_image_download.imageset/download@3x.png b/AssetKit/Sources/AssetKit/Resources/Images.xcassets/04-1_profile/ic_image_download.imageset/download@3x.png new file mode 100644 index 00000000..6eb0839e Binary files /dev/null and b/AssetKit/Sources/AssetKit/Resources/Images.xcassets/04-1_profile/ic_image_download.imageset/download@3x.png differ diff --git a/Hous-iOS-release/Scene/Profile/View/ProfileDetail/ProfileDetailNavigationView.swift b/Hous-iOS-release/Scene/Profile/View/ProfileDetail/ProfileDetailNavigationView.swift index 1b9b020d..b04e8ef4 100644 --- a/Hous-iOS-release/Scene/Profile/View/ProfileDetail/ProfileDetailNavigationView.swift +++ b/Hous-iOS-release/Scene/Profile/View/ProfileDetail/ProfileDetailNavigationView.swift @@ -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() 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 { @@ -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) diff --git a/Hous-iOS-release/Scene/Profile/View/ViewController/ProfileAlarmSettingViewController.swift b/Hous-iOS-release/Scene/Profile/View/ViewController/ProfileAlarmSettingViewController.swift index aefb2bbd..fff324b7 100644 --- a/Hous-iOS-release/Scene/Profile/View/ViewController/ProfileAlarmSettingViewController.swift +++ b/Hous-iOS-release/Scene/Profile/View/ViewController/ProfileAlarmSettingViewController.swift @@ -9,6 +9,7 @@ import UIKit import RxSwift import RxCocoa import Then +import HousUIComponent final class ProfileAlarmSettingViewController: BaseViewController, LoadingPresentable { @@ -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() diff --git a/Hous-iOS-release/Scene/Profile/View/ViewController/ProfileDetailViewController.swift b/Hous-iOS-release/Scene/Profile/View/ViewController/ProfileDetailViewController.swift index 818031ee..d23cff04 100644 --- a/Hous-iOS-release/Scene/Profile/View/ViewController/ProfileDetailViewController.swift +++ b/Hous-iOS-release/Scene/Profile/View/ViewController/ProfileDetailViewController.swift @@ -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() diff --git a/Hous-iOS-release/Scene/Profile/View/ViewController/ProfileSettingViewController.swift b/Hous-iOS-release/Scene/Profile/View/ViewController/ProfileSettingViewController.swift index 4f02b50c..c404d35e 100644 --- a/Hous-iOS-release/Scene/Profile/View/ViewController/ProfileSettingViewController.swift +++ b/Hous-iOS-release/Scene/Profile/View/ViewController/ProfileSettingViewController.swift @@ -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