Skip to content

Commit

Permalink
[Fix] 깃 충돌 해결 ..... #36
Browse files Browse the repository at this point in the history
  • Loading branch information
Guryss committed Nov 25, 2023
2 parents 97b8d45 + 9837f6b commit e3fdab3
Show file tree
Hide file tree
Showing 36 changed files with 531 additions and 98 deletions.
12 changes: 12 additions & 0 deletions SOPKATHON_33-iOS/SOPKATHON_33-iOS.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
D26AFFE82B127673007B90DF /* MoyaService.swift in Sources */ = {isa = PBXBuildFile; fileRef = D26AFFE72B127673007B90DF /* MoyaService.swift */; };
D26AFFEA2B12767B007B90DF /* MoyaAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = D26AFFE92B12767B007B90DF /* MoyaAPI.swift */; };
D26AFFEC2B127B0F007B90DF /* BaseViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D26AFFEB2B127B0F007B90DF /* BaseViewController.swift */; };
D26AFFEE2B128915007B90DF /* GelationModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = D26AFFED2B128915007B90DF /* GelationModel.swift */; };
D26AFFF02B1291DC007B90DF /* ProgressView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D26AFFEF2B1291DC007B90DF /* ProgressView.swift */; };
D26AFFF22B129A8F007B90DF /* ProgramModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = D26AFFF12B129A8F007B90DF /* ProgramModel.swift */; };
D28379A12B0FB83A00A1903B /* SnapKit in Frameworks */ = {isa = PBXBuildFile; productRef = D28379A02B0FB83A00A1903B /* SnapKit */; };
D28379A42B0FB84300A1903B /* Then in Frameworks */ = {isa = PBXBuildFile; productRef = D28379A32B0FB84300A1903B /* Then */; };
D28379A72B0FB86500A1903B /* Moya in Frameworks */ = {isa = PBXBuildFile; productRef = D28379A62B0FB86500A1903B /* Moya */; };
Expand Down Expand Up @@ -101,6 +104,9 @@
D26AFFE72B127673007B90DF /* MoyaService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MoyaService.swift; sourceTree = "<group>"; };
D26AFFE92B12767B007B90DF /* MoyaAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MoyaAPI.swift; sourceTree = "<group>"; };
D26AFFEB2B127B0F007B90DF /* BaseViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseViewController.swift; sourceTree = "<group>"; };
D26AFFED2B128915007B90DF /* GelationModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GelationModel.swift; sourceTree = "<group>"; };
D26AFFEF2B1291DC007B90DF /* ProgressView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProgressView.swift; sourceTree = "<group>"; };
D26AFFF12B129A8F007B90DF /* ProgramModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProgramModel.swift; sourceTree = "<group>"; };
D28379B82B0FBBEA00A1903B /* UIApplication+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIApplication+.swift"; sourceTree = "<group>"; };
D28379BA2B0FBBF500A1903B /* UIButton+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIButton+.swift"; sourceTree = "<group>"; };
D28379BC2B0FBC0400A1903B /* UICollectionReuseableView+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UICollectionReuseableView+.swift"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -206,6 +212,7 @@
A19A1F5A2B1255CF0077ACEC /* ActivityStackView.swift */,
A19A1F5C2B1258490077ACEC /* ActivityStackViewItem.swift */,
A13161442B12749800883CB2 /* UserInfoChipView.swift */,
D26AFFEF2B1291DC007B90DF /* ProgressView.swift */,
);
path = View;
sourceTree = "<group>";
Expand Down Expand Up @@ -288,6 +295,8 @@
isa = PBXGroup;
children = (
D26AFFDF2B1275B2007B90DF /* MainModel.swift */,
D26AFFED2B128915007B90DF /* GelationModel.swift */,
D26AFFF12B129A8F007B90DF /* ProgramModel.swift */,
);
path = Main;
sourceTree = "<group>";
Expand Down Expand Up @@ -583,14 +592,17 @@
D26AFFEA2B12767B007B90DF /* MoyaAPI.swift in Sources */,
D28379D92B0FBE5C00A1903B /* NetworkResult.swift in Sources */,
A19A1F522B12451B0077ACEC /* MainViewController.swift in Sources */,
D26AFFF22B129A8F007B90DF /* ProgramModel.swift in Sources */,
D28379FC2B0FC53500A1903B /* Device.swift in Sources */,
A13161452B12749800883CB2 /* UserInfoChipView.swift in Sources */,
E5CD4BF22B124BD600CF9D17 /* GelationCollectionViewCell.swift in Sources */,
E5CD4BF72B12637800CF9D17 /* CustomNavigationBarView.swift in Sources */,
D28379D52B0FBDB300A1903B /* APIConstant.swift in Sources */,
D28379DD2B0FBE9C00A1903B /* BaseAPI.swift in Sources */,
D26AFFEE2B128915007B90DF /* GelationModel.swift in Sources */,
D28379BF2B0FBC0F00A1903B /* UICollectionViewCell++.swift in Sources */,
D28379D12B0FBC7600A1903B /* UIViewController+.swift in Sources */,
D26AFFF02B1291DC007B90DF /* ProgressView.swift in Sources */,
D28379CD2B0FBC5F00A1903B /* UITextField+.swift in Sources */,
D206CADC2B0FB748007ECC1B /* ViewController.swift in Sources */,
D28379C72B0FBC4100A1903B /* UIStackView+.swift in Sources */,
Expand Down
12 changes: 12 additions & 0 deletions SOPKATHON_33-iOS/SOPKATHON_33-iOS/Data/Main/GelationModel.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
//
// GelationModel.swift
// SOPKATHON_33-iOS
//
// Created by 류희재 on 2023/11/26.
//

import Foundation

struct GelationModel: Codable {
let volunteers, programs, certifications: [String]
}
23 changes: 23 additions & 0 deletions SOPKATHON_33-iOS/SOPKATHON_33-iOS/Data/Main/ProgramModel.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
//
// ProgramModel.swift
// SOPKATHON_33-iOS
//
// Created by 류희재 on 2023/11/26.
//

import Foundation

// MARK: - Datum
struct ProgramModel: Codable {
let programID: Int
let title, registerAt, imageURL, status: String
let region: String

enum CodingKeys: String, CodingKey {
case programID = "program_id"
case title
case registerAt = "register_at"
case imageURL = "image_url"
case status, region
}
}
9 changes: 6 additions & 3 deletions SOPKATHON_33-iOS/SOPKATHON_33-iOS/Global/Constant/Image.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,12 @@ public enum Image {
static let ellipse1 = UIImage(named: "Ellipse 33")
static let ellipse2 = UIImage(named: "Ellipse 33-1")
static let ellipse3 = UIImage(named: "Ellipse 33-2")
static let star1 = UIImage(named: "ic_card2")
static let star2 = UIImage(named: "ic_card3")
static let card = UIImage(named: "img_card")
static let star1 = UIImage(named: "ic_card1")
static let star2 = UIImage(named: "ic_card2")
static let star3 = UIImage(named: "ic_card3")
static let card = UIImage(named: "img_card1")
static let card2 = UIImage(named: "img_card2")
static let card3 = UIImage(named: "img_card3")
static let background = UIImage(named: "img_mainbackground")
static let profileCard = UIImage(named: "img_profile")
static let logo = UIImage(named: "logo")
Expand Down
18 changes: 18 additions & 0 deletions SOPKATHON_33-iOS/SOPKATHON_33-iOS/Network/MoyaAPI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,23 @@ extension MoyaAPI {
completion: completion)
}
}

public func getGelationData(completion: @escaping (NetworkResult<Any>) -> Void) {
provider.request(.getGelationData) { (result) in
self.disposeNetwork(
result,
dataModel: GelationModel.self,
completion: completion)
}
}

public func getProgramData(type: String, completion: @escaping (NetworkResult<Any>) -> Void) {
provider.request(.getProgramData(type: type)) { (result) in
self.disposeNetwork(
result,
dataModel: [ProgramModel].self,
completion: completion)
}
}
}

14 changes: 14 additions & 0 deletions SOPKATHON_33-iOS/SOPKATHON_33-iOS/Network/MoyaService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,30 @@ import UIKit

enum MoyaService {
case getMainData
case getGelationData
case getProgramData(type: String)
}

extension MoyaService: BaseTargetType {
var path: String {
switch self {
case .getMainData:
return "/api/v1/user/info/\(1)"
case .getGelationData:
return "/api/v1/user/info/detail/\(1)"
case .getProgramData:
return "/api/v1/program"
}
}

var method: Moya.Method {
switch self {
case .getMainData:
return .get
case .getGelationData:
return .get
case .getProgramData:
return .get
}
}

Expand All @@ -34,6 +44,10 @@ extension MoyaService: BaseTargetType {
switch self {
case .getMainData:
return .requestPlain
case .getGelationData:
return .requestPlain
case .getProgramData(let type):
return .requestParameters(parameters: ["program_type": type], encoding: URLEncoding.default)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ final class TabBarController: UITabBarController {
setUI()
setTabBar()
view.backgroundColor = .white
view.tintColor = .white
}

private func setUI() {
Expand All @@ -27,9 +28,10 @@ final class TabBarController: UITabBarController {
let firstVc = MainViewController()
let secondVc = ProgramViewController()

firstVc.tabBarItem = UITabBarItem(title: "tab1" , image: .checkmark, tag: 0)
secondVc.tabBarItem = UITabBarItem(title: "tab2", image: .add, tag: 1)
firstVc.tabBarItem = UITabBarItem(title: nil, image: Image.tabBarItem1Unselected, selectedImage: Image.tabBarItem1Selected)

secondVc.tabBarItem = UITabBarItem(title: nil, image: Image.tabBarItem2Unselected, selectedImage: Image.tabBarItem2Selected)

self.viewControllers = [firstVc, secondVc]
setViewControllers(viewControllers, animated: true)
}
Expand Down
Loading

0 comments on commit e3fdab3

Please sign in to comment.