Skip to content

Commit

Permalink
[#4] 폴더링
Browse files Browse the repository at this point in the history
  • Loading branch information
ezidayzi committed Sep 24, 2021
1 parent 6cb50aa commit 67882e3
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 35 deletions.
14 changes: 13 additions & 1 deletion CheoMooRac/CheoMooRac.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
DD868E7026FB56D700D5BE38 /* StringManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD868E6F26FB56D700D5BE38 /* StringManager.swift */; };
DD8A91E226FD7AFB004DAF3B /* Dynamic.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD8A91E126FD7AFB004DAF3B /* Dynamic.swift */; };
DD8A91E526FD7B6C004DAF3B /* MainTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD8A91E426FD7B6C004DAF3B /* MainTableViewController.swift */; };
DD8A91E726FD94FA004DAF3B /* UIViewController+embed.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD8A91E626FD94FA004DAF3B /* UIViewController+embed.swift */; };
DD96AA7126FCC44A00C9AA43 /* Person.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD96AA7026FCC44A00C9AA43 /* Person.swift */; };
DD96AA7426FCC61200C9AA43 /* MainViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD96AA7326FCC61200C9AA43 /* MainViewModel.swift */; };
DDC49F1C26F8A829001921C1 /* ReadViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDC49F1B26F8A829001921C1 /* ReadViewController.swift */; };
Expand All @@ -56,6 +57,7 @@
DD868E6F26FB56D700D5BE38 /* StringManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StringManager.swift; sourceTree = "<group>"; };
DD8A91E126FD7AFB004DAF3B /* Dynamic.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Dynamic.swift; sourceTree = "<group>"; };
DD8A91E426FD7B6C004DAF3B /* MainTableViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainTableViewController.swift; sourceTree = "<group>"; };
DD8A91E626FD94FA004DAF3B /* UIViewController+embed.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIViewController+embed.swift"; sourceTree = "<group>"; };
DD96AA7026FCC44A00C9AA43 /* Person.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Person.swift; sourceTree = "<group>"; };
DD96AA7326FCC61200C9AA43 /* MainViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainViewModel.swift; sourceTree = "<group>"; };
DDC49F1B26F8A829001921C1 /* ReadViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReadViewController.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -116,6 +118,7 @@
DD2844BD26EF35EB004FC840 /* Sources */ = {
isa = PBXGroup;
children = (
DD8A91E826FD9523004DAF3B /* Dynamic */,
DD8A91E326FD7B3B004DAF3B /* Views */,
DD96AA7226FCC5EA00C9AA43 /* ViewModels */,
DD96AA6F26FCC43A00C9AA43 /* Models */,
Expand Down Expand Up @@ -180,6 +183,7 @@
DD6CCCE726F0811600C7BA2C /* UIView+addSubviews.swift */,
DD6CCCE926F0814300C7BA2C /* UIStackView+addArrangedSubviews.swift */,
DD372A5E26F0FD760033D40A /* UIButton+setBackgroundColor.swift */,
DD8A91E626FD94FA004DAF3B /* UIViewController+embed.swift */,
);
path = Exensions;
sourceTree = "<group>";
Expand Down Expand Up @@ -209,6 +213,14 @@
path = Views;
sourceTree = "<group>";
};
DD8A91E826FD9523004DAF3B /* Dynamic */ = {
isa = PBXGroup;
children = (
DD8A91E126FD7AFB004DAF3B /* Dynamic.swift */,
);
path = Dynamic;
sourceTree = "<group>";
};
DD96AA6F26FCC43A00C9AA43 /* Models */ = {
isa = PBXGroup;
children = (
Expand All @@ -221,7 +233,6 @@
isa = PBXGroup;
children = (
DD96AA7326FCC61200C9AA43 /* MainViewModel.swift */,
DD8A91E126FD7AFB004DAF3B /* Dynamic.swift */,
);
path = ViewModels;
sourceTree = "<group>";
Expand Down Expand Up @@ -311,6 +322,7 @@
DD8A91E526FD7B6C004DAF3B /* MainTableViewController.swift in Sources */,
DD96AA7126FCC44A00C9AA43 /* Person.swift in Sources */,
DD6CCCE826F0811600C7BA2C /* UIView+addSubviews.swift in Sources */,
DD8A91E726FD94FA004DAF3B /* UIViewController+embed.swift in Sources */,
DD2844AA26EF35C4004FC840 /* MainViewController.swift in Sources */,
DD372A5D26F0EEAF0033D40A /* ProfileHeaderView.swift in Sources */,
DD6CCCEF26F08EB200C7BA2C /* CreateViewController.swift in Sources */,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//
// UIViewController+embed.swift
// CheoMooRac
//
// Created by 김윤서 on 2021/09/24.
//

import UIKit

extension UIViewController {
func embed(_ viewController: UIViewController) {
viewController.willMove(toParent: self)
self.addChild(viewController)
viewController.didMove(toParent: self)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,16 @@

import UIKit


import SnapKit
import Then

extension UIViewController {
func embed(_ viewController: UIViewController) {
viewController.willMove(toParent: self)
self.addChild(viewController)
viewController.didMove(toParent: self)
}
}


class MainViewController: UIViewController {

var tableViewController: MainTableViewController!

override func viewDidLoad() {
super.viewDidLoad()

let mainViewModel = MainViewModel()
self.tableViewController = MainTableViewController(with: mainViewModel)
initViewController()
Expand Down
24 changes: 0 additions & 24 deletions CheoMooRac/CheoMooRac/Sources/ViewModels/MainViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,30 +46,6 @@ class MainViewModel: MainViewModelProtocol {
return Dynamic(list$)
}

// private var filteredList: [String] = []
// private var filterdHeaderList: [String] = []
// private var list = ["김윤서", "김루희", "윤예지", "김혜수", "코코", "민재", "잼권이", "리헤이", "노제", "몬익화", "립제이", "잘린이", "엠마", "모아나", "케이데이", "가비", "시미즈zz", "강호동", "이수근", "유재석", "리정" ]
//
// private var filteredList: [String] = []
// private var filterdHeaderList: [String] = []
//
// private var sectionHeaderList: [String] {
// var sectionHeaderList: [String] = []
// list.forEach { name in
// sectionHeaderList.append(StringManager.shared.chosungCheck(word: name))
// }
//
// return Array(Set(sectionHeaderList)).sorted()
// }

// var sectionHeaderList$: [String] {
// var sectionHeaderList: [String] = []
// self.list?.forEach { name in
// sectionHeaderList.append(StringManager.shared.chosungCheck(word: name))
// }
//
// return Array(Set(sectionHeaderList)).sorted()
// }

init() {
self.list.value = ["김윤서", "김루희", "윤예지", "김혜수", "코코", "민재", "잼권이", "리헤이", "노제", "몬익화", "립제이", "잘린이", "엠마", "모아나", "케이데이", "가비", "시미즈zz", "강호동", "이수근", "유재석", "리정" ]
Expand Down

0 comments on commit 67882e3

Please sign in to comment.