Skip to content

Commit

Permalink
Init: 프로젝트 파일 생성
Browse files Browse the repository at this point in the history
- 피처 별 vc 생성
- 타겟 나누기
- tuist 적용
- 프리뷰 적용
  • Loading branch information
Minny27 committed Oct 19, 2023
1 parent 06cfe7d commit fe8f58c
Show file tree
Hide file tree
Showing 31 changed files with 901 additions and 46 deletions.
96 changes: 51 additions & 45 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,40 @@
# Created by https://www.toptal.com/developers/gitignore/api/macos,swift,swiftpackagemanager,xcode
# Edit at https://www.toptal.com/developers/gitignore?templates=macos,swift,swiftpackagemanager,xcode

### macOS ###
# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon


# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

### macOS Patch ###
# iCloud generated files
*.icloud

### Swift ###
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
Expand Down Expand Up @@ -30,48 +67,8 @@ DerivedData/
*.dSYM.zip
*.dSYM

## Playgrounds
timeline.xctimeline
playground.xcworkspace

# Swift Package Manager
#
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
# Packages/
# Package.pins
# Package.resolved
# *.xcodeproj
#
# Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata
# hence it is not needed unless you have added a package configuration file to your project
# .swiftpm

.build/

# CocoaPods
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
#
# Pods/
#
# Add this line if you want to avoid checking in source code from the Xcode workspace
# *.xcworkspace

# Carthage
#
# Add this line if you want to avoid checking in source code from Carthage dependencies.
# Carthage/Checkouts

Carthage/Build/

# Accio dependency management
Dependencies/
.accio/

# fastlane
#
# It is recommended to not store the screenshots in the git repo.
# Instead, use fastlane to re-generate the screenshots whenever they are needed.
# For more information about the recommended setup visit:
Expand All @@ -82,9 +79,18 @@ fastlane/Preview.html
fastlane/screenshots/**/*.png
fastlane/test_output

# Code Injection
#
# After new code Injection tools there's a generated folder /iOSInjectionProject
# https://github.com/johnno1962/injectionforxcode
### SwiftPackageManager ###
Packages
xcuserdata
*.xcodeproj

### Projects ###
*.xcodeproj
*.xcworkspace

### Tuist derived files ###
graph.dot
Derived/

iOSInjectionProject/
### Tuist managed dependencies ###
Tuist/Dependencies
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"colors" : [
{
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
98 changes: 98 additions & 0 deletions Nagaza/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
{
"images" : [
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "20x20"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "20x20"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "29x29"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "29x29"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "40x40"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "40x40"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "60x60"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "60x60"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "20x20"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "20x20"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "29x29"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "29x29"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "40x40"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "40x40"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "76x76"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "76x76"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "83.5x83.5"
},
{
"idiom" : "ios-marketing",
"scale" : "1x",
"size" : "1024x1024"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
6 changes: 6 additions & 0 deletions Nagaza/Resources/Assets.xcassets/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
27 changes: 27 additions & 0 deletions Nagaza/Sources/Feature/Login/LoginViewController.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
//
// LoginViewController.swift
// Nagaza
//
// Created by SeungMin on 2023/10/18.
//

import UIKit

final class LoginViewController: UIViewController {

override func viewDidLoad() {
super.viewDidLoad()
view.backgroundColor = .orange
}
}

#if DEBUG
import SwiftUI

struct LoginViewControllerPreview: PreviewProvider {
static var previews: some View {
let viewController = LoginViewController()
return viewController.toPreView()
}
}
#endif
27 changes: 27 additions & 0 deletions Nagaza/Sources/Feature/Main/MainViewController.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
//
// MainViewController.swift
// Nagaza
//
// Created by SeungMin on 2023/10/18.
//

import UIKit

final class MainViewController: UIViewController {

override func viewDidLoad() {
super.viewDidLoad()

}
}

#if DEBUG
import SwiftUI

struct MainViewControllerPreview: PreviewProvider {
static var previews: some View {
let viewController = MainViewController()
return viewController.toPreView()
}
}
#endif
29 changes: 29 additions & 0 deletions Nagaza/Sources/Feature/Map/MapViewController.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
//
// MapViewController.swift
// Nagaza
//
// Created by SeungMin on 2023/10/18.
//

import UIKit

final class MapViewController: UIViewController {

override func viewDidLoad() {
super.viewDidLoad()
view.backgroundColor = .blue

view.addSubview(MapView(frame: CGRect(x: 0, y: 0, width: 300, height: 300)))
}
}

#if DEBUG
import SwiftUI

struct MapViewControllerPreview: PreviewProvider {
static var previews: some View {
let viewController = MapViewController()
return viewController.toPreView()
}
}
#endif
73 changes: 73 additions & 0 deletions Nagaza/Sources/Feature/Map/Subviews/MapView.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
//
// MapView.swift
// Nagaza
//
// Created by SeungMin on 2023/10/19.
//

import UIKit
import SnapKit

final class MapView: UIView {

let stackView: UIStackView = {
let stackView = UIStackView()
stackView.axis = .vertical
stackView.spacing = 8
stackView.backgroundColor = .orange
return stackView
}()

let titleLabel: UILabel = {
let label = UILabel()
label.text = "우아아아아"
return label
}()

let subLabel: UILabel = {
let label = UILabel()
label.text = "우아아아아"
return label
}()

init() {
super.init(frame: .zero)
setup()
}

override init(frame: CGRect) {
super.init(frame: frame)
setup()
}

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

func setup() {
self.translatesAutoresizingMaskIntoConstraints = false

self.addSubview(stackView)
stackView.snp.makeConstraints {
$0.centerX.equalToSuperview()
$0.centerY.equalToSuperview()
}

stackView.addArrangedSubviews([
titleLabel, subLabel
])
}
}

#if DEBUG
import SwiftUI

struct CarouselViewPreview: PreviewProvider {
static var previews: some View {
MapView()
.toPreView()
.frame(width: 0,
height: 200)
}
}
#endif
Loading

0 comments on commit fe8f58c

Please sign in to comment.