Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Runnect-iOS/.swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ disabled_rules:
- type_name
- legacy_constructor
- unused_setter_value
- force_try

included:
- Runnect-iOS
Expand Down
14 changes: 1 addition & 13 deletions Runnect-iOS/Runnect-iOS.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
A3BC2F2F2962C40A00198261 /* UploadedCourseInfoVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3BC2F2E2962C40A00198261 /* UploadedCourseInfoVC.swift */; };
A3BC2F322962E0DB00198261 /* GoalRewardInfoModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3BC2F312962E0DB00198261 /* GoalRewardInfoModel.swift */; };
A3BC2F34296303A600198261 /* GoalRewardInfoCVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3BC2F33296303A600198261 /* GoalRewardInfoCVC.swift */; };
A3BC2F382963CE3700198261 /* ActivityRecordInfoModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3BC2F372963CE3700198261 /* ActivityRecordInfoModel.swift */; };
A3BC2F3A2963D0ED00198261 /* ActivityRecordInfoTVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3BC2F392963D0ED00198261 /* ActivityRecordInfoTVC.swift */; };
A3BC2F3D296468E500198261 /* UploadedCourseInfoModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3BC2F3C296468E500198261 /* UploadedCourseInfoModel.swift */; };
A3BC2F3F2964706100198261 /* UploadedCourseInfoCVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3BC2F3E2964706100198261 /* UploadedCourseInfoCVC.swift */; };
A3BC2F4129667A0D00198261 /* NicknameEditorVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3BC2F4029667A0D00198261 /* NicknameEditorVC.swift */; };
A3BC2F432966A93100198261 /* CourseDetailVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3BC2F422966A93100198261 /* CourseDetailVC.swift */; };
Expand Down Expand Up @@ -156,9 +154,7 @@
A3BC2F2E2962C40A00198261 /* UploadedCourseInfoVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UploadedCourseInfoVC.swift; sourceTree = "<group>"; };
A3BC2F312962E0DB00198261 /* GoalRewardInfoModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GoalRewardInfoModel.swift; sourceTree = "<group>"; };
A3BC2F33296303A600198261 /* GoalRewardInfoCVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GoalRewardInfoCVC.swift; sourceTree = "<group>"; };
A3BC2F372963CE3700198261 /* ActivityRecordInfoModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ActivityRecordInfoModel.swift; sourceTree = "<group>"; };
A3BC2F392963D0ED00198261 /* ActivityRecordInfoTVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ActivityRecordInfoTVC.swift; sourceTree = "<group>"; };
A3BC2F3C296468E500198261 /* UploadedCourseInfoModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UploadedCourseInfoModel.swift; sourceTree = "<group>"; };
A3BC2F3E2964706100198261 /* UploadedCourseInfoCVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UploadedCourseInfoCVC.swift; sourceTree = "<group>"; };
A3BC2F4029667A0D00198261 /* NicknameEditorVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NicknameEditorVC.swift; sourceTree = "<group>"; };
A3BC2F422966A93100198261 /* CourseDetailVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CourseDetailVC.swift; sourceTree = "<group>"; };
Expand All @@ -176,7 +172,6 @@
CE10064D29680D2500FD31FB /* .gitkeep */ = {isa = PBXFileReference; lastKnownFileType = text; path = .gitkeep; sourceTree = "<group>"; };
CE10064F29680D3300FD31FB /* .gitkeep */ = {isa = PBXFileReference; lastKnownFileType = text; path = .gitkeep; sourceTree = "<group>"; };
CE10065029680D3800FD31FB /* .gitkeep */ = {isa = PBXFileReference; lastKnownFileType = text; path = .gitkeep; sourceTree = "<group>"; };
CE10065129680D3F00FD31FB /* .gitkeep */ = {isa = PBXFileReference; lastKnownFileType = text; path = .gitkeep; sourceTree = "<group>"; };
CE10065229680D4400FD31FB /* .gitkeep */ = {isa = PBXFileReference; lastKnownFileType = text; path = .gitkeep; sourceTree = "<group>"; };
CE10065429680F7000FD31FB /* DepartureSearchingResponseDto.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DepartureSearchingResponseDto.swift; sourceTree = "<group>"; };
CE1006562968230800FD31FB /* DepartureLocationModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DepartureLocationModel.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -284,7 +279,6 @@
CEEC6B3B2961C51A00D00E1E /* CourseStorageVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CourseStorageVC.swift; sourceTree = "<group>"; };
CEEC6B3D2961C53700D00E1E /* CourseDiscoveryVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CourseDiscoveryVC.swift; sourceTree = "<group>"; };
CEEC6B3F2961C55000D00E1E /* MyPageVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyPageVC.swift; sourceTree = "<group>"; };
CEEC6B432961C59F00D00E1E /* .gitkeep */ = {isa = PBXFileReference; lastKnownFileType = text; path = .gitkeep; sourceTree = "<group>"; };
CEEC6B442961C5A800D00E1E /* .gitkeep */ = {isa = PBXFileReference; lastKnownFileType = text; path = .gitkeep; sourceTree = "<group>"; };
CEEC6B452961C5B200D00E1E /* .gitkeep */ = {isa = PBXFileReference; lastKnownFileType = text; path = .gitkeep; sourceTree = "<group>"; };
CEEC6B482961C5E200D00E1E /* SplashVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SplashVC.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -350,7 +344,6 @@
A3BC2F302962E08400198261 /* GoalRewardInfoCollectionView */ = {
isa = PBXGroup;
children = (
A3BC2F312962E0DB00198261 /* GoalRewardInfoModel.swift */,
A3BC2F33296303A600198261 /* GoalRewardInfoCVC.swift */,
);
path = GoalRewardInfoCollectionView;
Expand All @@ -359,7 +352,6 @@
A3BC2F362963CD2100198261 /* ActivityRecordInfoTableView */ = {
isa = PBXGroup;
children = (
A3BC2F372963CE3700198261 /* ActivityRecordInfoModel.swift */,
A3BC2F392963D0ED00198261 /* ActivityRecordInfoTVC.swift */,
);
path = ActivityRecordInfoTableView;
Expand All @@ -368,7 +360,6 @@
A3BC2F3B2964671D00198261 /* UploadedCourseInfoCollectionView */ = {
isa = PBXGroup;
children = (
A3BC2F3C296468E500198261 /* UploadedCourseInfoModel.swift */,
A3BC2F3E2964706100198261 /* UploadedCourseInfoCVC.swift */,
);
path = UploadedCourseInfoCollectionView;
Expand Down Expand Up @@ -481,7 +472,7 @@
CE10064829680CF200FD31FB /* MyPageModel */ = {
isa = PBXGroup;
children = (
CE10065129680D3F00FD31FB /* .gitkeep */,
A3BC2F312962E0DB00198261 /* GoalRewardInfoModel.swift */,
);
path = MyPageModel;
sourceTree = "<group>";
Expand Down Expand Up @@ -661,7 +652,6 @@
DAD5A3DB296C6DB800C8166B /* MapCollectionViewCell.swift */,
DAD5A3D9296C6DA500C8166B /* TitleCollectionViewCell.swift */,
DAD5A3D7296C6D9600C8166B /* AdImageCollectionViewCell.swift */,
CEEC6B432961C59F00D00E1E /* .gitkeep */,
CE17F0432961C3D600E1DED0 /* VC */,
);
path = Views;
Expand Down Expand Up @@ -1384,7 +1374,6 @@
A3BC2F432966A93100198261 /* CourseDetailVC.swift in Sources */,
DAD5A3D8296C6D9600C8166B /* AdImageCollectionViewCell.swift in Sources */,
CE18E890296C76C100FEB569 /* RNLocationModel.swift in Sources */,
A3BC2F3D296468E500198261 /* UploadedCourseInfoModel.swift in Sources */,
CE6655DC295D873500C64E12 /* UIButton+.swift in Sources */,
CE6655D4295D865B00C64E12 /* Publisher+UIControl.swift in Sources */,
CE0D9FD329648DA300CEB5CD /* CustomAlertVC.swift in Sources */,
Expand Down Expand Up @@ -1430,7 +1419,6 @@
CEC2A68E2962AF2C00160BF7 /* RNMarker.swift in Sources */,
CE6655D2295D862A00C64E12 /* Publisher+Driver.swift in Sources */,
CE4942AA296FCCFC00736701 /* UploadedCourseDetailRouter.swift in Sources */,
A3BC2F382963CE3700198261 /* ActivityRecordInfoModel.swift in Sources */,
CE6655E6295D887F00C64E12 /* UIStackView+.swift in Sources */,
A3BC2F34296303A600198261 /* GoalRewardInfoCVC.swift in Sources */,
DA97A035296E685C0086760E /* CourseUploadingRouter.swift in Sources */,
Expand Down
1 change: 1 addition & 0 deletions Runnect-iOS/Runnect-iOS/Global/Literal/ImageLiterals.swift
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ enum ImageLiterals {
static var imgTelescope: UIImage { .load(named: "img_telescope") }
static var imgSpaceship: UIImage { .load(named: "img_spaceship") }
static var imgAppIcon: UIImage { .load(named: "img_app_icon") }
static var imgAd: UIImage { .load(named: "img_ad") }
}

extension UIImage {
Expand Down
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"scale" : "2x"
},
{
"filename" : "Mask group@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
Expand Down
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 @@ -52,23 +52,22 @@ final class RNMapView: UIView {

public init() {
super.init(frame: .zero)
setUI()
setLayout()
setDelegate()
setMap()
getLocationAuth()
setPathOverlay()
self.mapInit()
}

override init(frame: CGRect) {
super.init(frame: frame)
self.mapInit()
setLocationOverlay()
}

private func mapInit() {
setUI()
setLayout()
setDelegate()
setMap()
getLocationAuth()
setPathOverlay()
setLocationOverlay()
}

required init?(coder: NSCoder) {
Expand Down Expand Up @@ -148,7 +147,6 @@ extension RNMapView {
locations[1...].forEach { location in
makeMarker(at: location)
}

return self
}

Expand Down Expand Up @@ -191,7 +189,6 @@ extension RNMapView {
@discardableResult
func moveToLocation(location: NMGLatLng) -> Self {
let cameraUpdate = NMFCameraUpdate(scrollTo: location)

DispatchQueue.main.async { [self] in
cameraUpdate.animation = .easeIn
self.map.mapView.moveCamera(cameraUpdate)
Expand Down Expand Up @@ -304,7 +301,7 @@ extension RNMapView {
map.mapView.extent = NMGLatLngBounds(southWestLat: 31.43, southWestLng: 122.37, northEastLat: 44.35, northEastLng: 132)
map.showLocationButton = false
map.showScaleBar = false

map.showZoomControls = false
map.mapView.logoAlign = .rightTop
}

Expand Down
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ extension CourseUploadingRouter: TargetType {
var task: Moya.Task {
switch self {
case .courseUploadingData(param: let param):
return .requestParameters(parameters: try! param.asParameter(), encoding: JSONEncoding.default)
do {
return .requestParameters(parameters: try param.asParameter(), encoding: JSONEncoding.default)
} catch {
fatalError("Encoding 실패")
}
}
}

Expand Down
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class AdImageCollectionViewCell: UICollectionViewCell {

// MARK: - UI Components
private let adImageView = UIImageView().then {
$0.image = UIImage(named: "adimage")
$0.image = ImageLiterals.imgAd
}
// MARK: - Life cycle
override init(frame: CGRect) {
Expand All @@ -34,11 +34,8 @@ extension AdImageCollectionViewCell {
func layout() {
contentView.backgroundColor = .clear
contentView.addSubview(adImageView)
adImageView.snp.makeConstraints {
$0.top.equalToSuperview()
$0.leading.trailing.equalTo(self.contentView.safeAreaLayoutGuide)
$0.height.equalTo(183)
adImageView.snp.makeConstraints { make in
make.edges.equalToSuperview()
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ extension CourseDiscoveryVC {
case .success(let result):
let status = result.statusCode
if 200..<300 ~= status {
self.getCourseData()
print("스크랩 성공")
}
if status >= 400 {
print("400 error")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ final class CourseSearchVC: UIViewController {
private let dividerView = UIView().then {
$0.backgroundColor = .g5
}

private lazy var mapCollectionView: UICollectionView = {
let layout = UICollectionViewFlowLayout()
layout.scrollDirection = .vertical
Expand Down Expand Up @@ -103,6 +104,7 @@ extension CourseSearchVC {
}
private func setData(data: [PublicCourse]) {
self.courseList = data
self.emptyDataView.isHidden = !data.isEmpty
mapCollectionView.reloadData()
}
}
Expand Down Expand Up @@ -130,7 +132,9 @@ extension CourseSearchVC {
make.top.equalTo(self.dividerView.snp.bottom)
make.leading.trailing.bottom.equalTo(self.view.safeAreaLayoutGuide)
}

mapCollectionView.addSubview(emptyDataView)

emptyDataView.snp.makeConstraints { make in
make.center.equalToSuperview()
}
Expand Down Expand Up @@ -194,6 +198,7 @@ extension CourseSearchVC: UICollectionViewDelegateFlowLayout {

extension CourseSearchVC: CustomNavigationBarDelegate {
func searchButtonDidTap(text: String) {
guard !text.isEmpty else { return }
searchCourseWithKeyword(keyword: text)
self.keyword = text
}
Expand Down Expand Up @@ -224,6 +229,7 @@ extension CourseSearchVC {
guard let data = responseDto.data else { return }
self.setData(data: data.publicCourses)
} catch {
self.setData(data: [])
print(error.localizedDescription)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class CourseUploadVC: UIViewController {
$0.backgroundColor = .g5
}
private let distanceInfoView = CourseDetailInfoView(title: "거리", description: "0.0km")
private let departureInfoView = CourseDetailInfoView(title: "출발지", description: "패스트파이브 을지로점")
private let departureInfoView = CourseDetailInfoView(title: "출발지", description: "")
private let placeholder = "코스에 대한 소개를 적어주세요.(난이도/풍경/지형)"

let activityTextView = UITextView().then {
Expand Down Expand Up @@ -246,28 +246,29 @@ extension CourseUploadVC {
mapImageView.snp.makeConstraints { make in
make.top.equalToSuperview()
make.leading.trailing.equalTo(self.view.safeAreaLayoutGuide)
make.height.equalTo(313)
make.height.equalTo(mapImageView.snp.width).multipliedBy(0.75)
}

courseTitleTextField.snp.makeConstraints { make in
make.top.equalTo(mapImageView.snp.bottom).offset(28)
make.leading.trailing.equalToSuperview().inset(16)
make.leading.trailing.equalTo(view.safeAreaLayoutGuide).inset(16)
make.height.equalTo(35)
}

dividerView.snp.makeConstraints { make in
make.top.equalTo(courseTitleTextField.snp.bottom).offset(0)
make.leading.trailing.equalTo(self.view.safeAreaLayoutGuide).inset(16)
make.leading.trailing.equalTo(view.safeAreaLayoutGuide).inset(16)
make.height.equalTo(2)
}

distanceInfoView.snp.makeConstraints { make in
make.top.equalTo(courseTitleTextField.snp.bottom).offset(22)
make.leading.trailing.equalToSuperview().inset(16)
make.leading.trailing.equalTo(view.safeAreaLayoutGuide).inset(16)
make.height.equalTo(16)
}
departureInfoView.snp.makeConstraints { make in
make.top.equalTo(distanceInfoView.snp.bottom).offset(6)
make.leading.trailing.equalToSuperview().inset(16)
make.leading.trailing.equalTo(view.safeAreaLayoutGuide).inset(16)
make.height.equalTo(16)
}
activityTextView.snp.makeConstraints { make in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ extension CourseDrawingVC {
func setData(model: DepartureLocationModel) {
self.departureLocationModel = model

self.naviBar.setTextFieldText(text: model.departureName)
self.mapView.makeStartMarker(at: model.toNMGLatLng(), withCameraMove: true)
self.departureLocationLabel.text = model.departureName
self.departureDetailLocationLabel.text = model.departureAddress
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ final class ActivityRecordInfoTVC: UITableViewCell {

private let activityRecordMapImage = UIImageView().then {
$0.layer.cornerRadius = 10
$0.clipsToBounds = true
}

private lazy var activityRecordTitleLabel = setBlackTitle()
Expand Down Expand Up @@ -93,8 +94,6 @@ final class ActivityRecordInfoTVC: UITableViewCell {

extension ActivityRecordInfoTVC {
func setData(model: ActivityRecord) {
guard let imageURL = URL(string: model.image) else { return }

// 날짜 바꾸기
let activityRecordDate = model.createdAt.prefix(10)
let resultDate = RNTimeFormatter.changeDateSplit(date: String(activityRecordDate))
Expand All @@ -103,7 +102,6 @@ extension ActivityRecordInfoTVC {
let activityRecordRunningTime = model.time.suffix(7)

// 평균 페이스 바꾸기
let activityRecordAveragePace = model.pace
let array = spiltActivityRecordAveragePace(model: model)

activityRecordTitleLabel.text = model.title
Expand All @@ -112,7 +110,7 @@ extension ActivityRecordInfoTVC {
setUpactivityRecordTotalDistanceValueLabel(model: model, label: activityRecordTotalDistanceValueLabel)
activityRecordRunningTimeValueLabel.text = String(activityRecordRunningTime)
setUpActivityRecordAveragePaceValueLabel(array: array, label: activityRecordAveragePaceValueLabel)
self.activityRecordMapImage.kf.setImage(with: imageURL)
activityRecordMapImage.setImage(with: model.image)
}

private func setUpActivityRecordPlaceLabel(model: ActivityRecord, label: UILabel) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ final class GoalRewardInfoVC: UIViewController {

// MARK: - Constants

final let stampInset: UIEdgeInsets = UIEdgeInsets(top: 32, left: 34, bottom: 10, right: 34)
final let stampInset: UIEdgeInsets = UIEdgeInsets(top: 32, left: 34, bottom: 32, right: 34)
final let stampLineSpacing: CGFloat = 20
final let stampItemSpacing: CGFloat = 26
final let stampCellHeight: CGFloat = 112
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ final class UploadedCourseInfoCVC: UICollectionViewCell {

private let uploadedCourseMapImage = UIImageView().then {
$0.layer.cornerRadius = 5
$0.clipsToBounds = true
}

private let uploadedCourseTitleLabel = UILabel().then {
Expand All @@ -44,11 +45,9 @@ final class UploadedCourseInfoCVC: UICollectionViewCell {

extension UploadedCourseInfoCVC {
func setData(model: PublicCourse) {
guard let imageURL = URL(string: model.image) else { return }

uploadedCourseMapImage.setImage(with: model.image)
uploadedCourseTitleLabel.text = model.title
setUploadedCoursePlaceLabel(model: model, label: uploadedCoursePlaceLabel)
self.uploadedCourseMapImage.kf.setImage(with: imageURL)
}

func setUploadedCoursePlaceLabel(model: PublicCourse, label: UILabel) {
Expand Down
Loading