Skip to content

Commit

Permalink
[fix] Runnect#39 courseDiscoveryVC UI 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
lee-yeonwoo2 committed Jan 5, 2023
1 parent cd1f9e3 commit e7ee494
Show file tree
Hide file tree
Showing 13 changed files with 416 additions and 3 deletions.
36 changes: 36 additions & 0 deletions Runnect-iOS/Runnect-iOS.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,13 @@
CEEC6B402961C55000D00E1E /* MyPageVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = CEEC6B3F2961C55000D00E1E /* MyPageVC.swift */; };
CEEC6B492961C5E200D00E1E /* SplashVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = CEEC6B482961C5E200D00E1E /* SplashVC.swift */; };
CEEC6B4B2961D89700D00E1E /* CustomNavigationBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = CEEC6B4A2961D89700D00E1E /* CustomNavigationBar.swift */; };
DA20D83F296696A000F1581F /* MapModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA20D83E296696A000F1581F /* MapModel.swift */; };
DA20D841296696C300F1581F /* MapCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA20D840296696C300F1581F /* MapCollectionViewCell.swift */; };
DA20D8432966977D00F1581F /* SearchResultViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA20D8422966977D00F1581F /* SearchResultViewController.swift */; };
DA20D8452966979100F1581F /* DiscoveryDetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA20D8442966979100F1581F /* DiscoveryDetailViewController.swift */; };
DA20D847296697A600F1581F /* PlusDetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA20D846296697A600F1581F /* PlusDetailViewController.swift */; };
DA20D849296697B400F1581F /* UploadViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA20D848296697B400F1581F /* UploadViewController.swift */; };
DA20D84B296697C600F1581F /* UploadResultViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA20D84A296697C600F1581F /* UploadResultViewController.swift */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
Expand Down Expand Up @@ -193,6 +200,13 @@
CEEC6B462961C5BB00D00E1E /* .gitkeep */ = {isa = PBXFileReference; lastKnownFileType = text; path = .gitkeep; sourceTree = "<group>"; };
CEEC6B482961C5E200D00E1E /* SplashVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SplashVC.swift; sourceTree = "<group>"; };
CEEC6B4A2961D89700D00E1E /* CustomNavigationBar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomNavigationBar.swift; sourceTree = "<group>"; };
DA20D83E296696A000F1581F /* MapModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapModel.swift; sourceTree = "<group>"; };
DA20D840296696C300F1581F /* MapCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapCollectionViewCell.swift; sourceTree = "<group>"; };
DA20D8422966977D00F1581F /* SearchResultViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchResultViewController.swift; sourceTree = "<group>"; };
DA20D8442966979100F1581F /* DiscoveryDetailViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DiscoveryDetailViewController.swift; sourceTree = "<group>"; };
DA20D846296697A600F1581F /* PlusDetailViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlusDetailViewController.swift; sourceTree = "<group>"; };
DA20D848296697B400F1581F /* UploadViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UploadViewController.swift; sourceTree = "<group>"; };
DA20D84A296697C600F1581F /* UploadResultViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UploadResultViewController.swift; sourceTree = "<group>"; };
E837271A78E1C0A0C30789BF /* Pods-Runnect-iOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runnect-iOS.release.xcconfig"; path = "Target Support Files/Pods-Runnect-iOS/Pods-Runnect-iOS.release.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */

Expand Down Expand Up @@ -329,6 +343,7 @@
CE17F03C2961C32C00E1DED0 /* CourseDiscovery */ = {
isa = PBXGroup;
children = (
DA20D83D2966968500F1581F /* Reuse */,
CE17F0442961C3D900E1DED0 /* Views */,
CE17F0432961C3D600E1DED0 /* VC */,
);
Expand Down Expand Up @@ -400,6 +415,11 @@
isa = PBXGroup;
children = (
CEEC6B432961C59F00D00E1E /* .gitkeep */,
DA20D8422966977D00F1581F /* SearchResultViewController.swift */,
DA20D8442966979100F1581F /* DiscoveryDetailViewController.swift */,
DA20D846296697A600F1581F /* PlusDetailViewController.swift */,
DA20D848296697B400F1581F /* UploadViewController.swift */,
DA20D84A296697C600F1581F /* UploadResultViewController.swift */,
);
path = Views;
sourceTree = "<group>";
Expand Down Expand Up @@ -729,6 +749,15 @@
path = VC;
sourceTree = "<group>";
};
DA20D83D2966968500F1581F /* Reuse */ = {
isa = PBXGroup;
children = (
DA20D83E296696A000F1581F /* MapModel.swift */,
DA20D840296696C300F1581F /* MapCollectionViewCell.swift */,
);
path = Reuse;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
Expand Down Expand Up @@ -884,6 +913,7 @@
A3BC2F2B2962C3D500198261 /* GoalRewardInfoVC.swift in Sources */,
CE665606295D91C500C64E12 /* makeVibrate.swift in Sources */,
CE66560A295D924A00C64E12 /* Result+.swift in Sources */,
DA20D847296697A600F1581F /* PlusDetailViewController.swift in Sources */,
CE66560E295D92A500C64E12 /* setStatusBarBackgroundColor.swift in Sources */,
CE6655D7295D86F900C64E12 /* String+.swift in Sources */,
CE58759E29601476005D967E /* LoadingIndicator.swift in Sources */,
Expand All @@ -892,6 +922,7 @@
CE4545C9295D7AF4003201E1 /* AppDelegate.swift in Sources */,
CE6655C8295D849F00C64E12 /* StringLiterals.swift in Sources */,
CEEC6B3E2961C53700D00E1E /* CourseDiscoveryVC.swift in Sources */,
DA20D8452966979100F1581F /* DiscoveryDetailViewController.swift in Sources */,
CE6655E0295D87D200C64E12 /* UIDevice+.swift in Sources */,
CE17F0382961BF8B00E1DED0 /* FontLiterals.swift in Sources */,
CE6655E8295D889600C64E12 /* UISwitch+.swift in Sources */,
Expand All @@ -901,12 +932,14 @@
CE6655F0295D891B00C64E12 /* UITextView+.swift in Sources */,
CEC2A6922962BE2900160BF7 /* DepartureSearchVC.swift in Sources */,
CE6655EE295D88E600C64E12 /* UITextField+.swift in Sources */,
DA20D841296696C300F1581F /* MapCollectionViewCell.swift in Sources */,
CE6655F8295D90CF00C64E12 /* adjusted+.swift in Sources */,
CE4545CB295D7AF4003201E1 /* SceneDelegate.swift in Sources */,
A3BC2F3F2964706100198261 /* UploadedCourseInfoCVC.swift in Sources */,
CE6655FE295D912300C64E12 /* calculateTopInset.swift in Sources */,
CEEC6B492961C5E200D00E1E /* SplashVC.swift in Sources */,
CE6655D0295D85FF00C64E12 /* CancelBag.swift in Sources */,
DA20D83F296696A000F1581F /* MapModel.swift in Sources */,
A3BC2F3D296468E500198261 /* UploadedCourseInfoModel.swift in Sources */,
CE6655DC295D873500C64E12 /* UIButton+.swift in Sources */,
CE6655D4295D865B00C64E12 /* Publisher+UIControl.swift in Sources */,
Expand All @@ -923,12 +956,15 @@
CEEC6B402961C55000D00E1E /* MyPageVC.swift in Sources */,
CE665608295D921500C64E12 /* setImage.swift in Sources */,
CE146770296568DC00DCEA1B /* RunTrackingVC.swift in Sources */,
DA20D849296697B400F1581F /* UploadViewController.swift in Sources */,
CE665612295D92E400C64E12 /* UserDefaultWrapper.swift in Sources */,
A3BC2F3A2963D0ED00198261 /* ActivityRecordInfoTVC.swift in Sources */,
CE665610295D92C200C64E12 /* setTextLineHeight.swift in Sources */,
CE6655E2295D87EB00C64E12 /* UIImage+.swift in Sources */,
A3BC2F322962E0DB00198261 /* GoalRewardInfoModel.swift in Sources */,
CEC2A68C2962AE1B00160BF7 /* RNStartMarker.swift in Sources */,
DA20D84B296697C600F1581F /* UploadResultViewController.swift in Sources */,
DA20D8432966977D00F1581F /* SearchResultViewController.swift in Sources */,
CE5875A4296015D2005D967E /* Encodable+.swift in Sources */,
CE14677A2965A80700DCEA1B /* CustomBottomSheetVC.swift in Sources */,
CEEC6B4B2961D89700D00E1E /* CustomNavigationBar.swift in Sources */,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"images" : [
{
"filename" : "Mask group.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Mask group@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"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.
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
//
// MapCollectionViewCell.swift
// Runnect-iOS
//
// Created by YEONOO on 2023/01/02.
//

import UIKit
import SnapKit

import Then

class MapCollectionViewCell: UICollectionViewCell {

// MARK: - Identifier
static let identifier = "MapCollectionViewCell"
// MARK: - UI Components
private let mapContainerView = UIView()
private let mapImageView = UIImageView().then {
$0.image = ImageLiterals.imgLogo
}
private let titleLabel = UILabel().then {
$0.text = "제목제목제목제목제목"
$0.font = UIFont.b4
$0.textColor = UIColor.black
}
private let locationLabel = UILabel().then {
$0.text = "00시 00구"
$0.font = UIFont.b6
$0.textColor = UIColor.g2
}
private let heartButton = UIImageView().then {
$0.image = ImageLiterals.icHeartFill
}
// MARK: - Life cycle
override init(frame: CGRect) {
super.init(frame: frame)
layout()

}

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

}

// MARK: - Extensions

extension MapCollectionViewCell {
// MARK: - Layout Helpers

private func layout() {
contentView.backgroundColor = .clear
mapImageView.backgroundColor = .systemGray4
[mapContainerView, mapImageView, titleLabel, locationLabel, heartButton].forEach {
contentView.addSubview($0)}
mapContainerView.addSubview(mapImageView)
mapContainerView.snp.makeConstraints {
$0.top.equalToSuperview()
$0.centerX.equalToSuperview()
$0.leading.equalToSuperview()
$0.height.equalTo(161)
}
mapImageView.snp.makeConstraints {
$0.top.leading.trailing.equalToSuperview()
$0.height.equalTo(110)

}
titleLabel.snp.makeConstraints {
$0.top.equalTo(mapImageView.snp.bottom).offset(4)
$0.leading.equalTo(self.mapContainerView.snp.leading)
}
heartButton.snp.makeConstraints {
$0.top.equalTo(mapImageView.snp.bottom).offset(4)
$0.width.equalTo(14)
$0.height.equalTo(12)
$0.trailing.equalTo(self.mapContainerView.snp.trailing)
}
locationLabel.snp.makeConstraints {
$0.top.equalTo(titleLabel.snp.bottom).offset(1)
$0.leading.equalTo(self.mapContainerView.snp.leading)
}
}

// MARK: - General Helpers

func dataBind(model: MapModel) {
mapImageView.image = UIImage(named: model.mapImage)
titleLabel.text = model.title
locationLabel.text = model.location
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//
// MapModel.swift
// Runnect-iOS
//
// Created by YEONOO on 2023/01/03.
//

import Foundation

struct MapModel {
let mapImage: String
let title: String
let location: String
}
Loading

0 comments on commit e7ee494

Please sign in to comment.