Skip to content
Open
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
410 changes: 410 additions & 0 deletions FE/MoodMeterDiary/MoodMeterDiary.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
36 changes: 36 additions & 0 deletions FE/MoodMeterDiary/MoodMeterDiary/App/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
//
// AppDelegate.swift
// MoodMeterDiary
//
// Created by mint on 1/17/24.
//

import UIKit

@main
class AppDelegate: UIResponder, UIApplicationDelegate {



func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
return true
}

// MARK: UISceneSession Lifecycle

func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
// Called when a new scene session is being created.
// Use this method to select a configuration to create the new scene with.
return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
}

func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) {
// Called when the user discards a scene session.
// If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
// Use this method to release any resources that were specific to the discarded scenes, as they will not return.
}


}

27 changes: 27 additions & 0 deletions FE/MoodMeterDiary/MoodMeterDiary/App/SceneDelegate.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
//
// SceneDelegate.swift
// MoodMeterDiary
//
// Created by mint on 1/17/24.
//

import UIKit

class SceneDelegate: UIResponder, UIWindowSceneDelegate {

var window: UIWindow?


func scene(_ scene: UIScene,
willConnectTo session: UISceneSession,
options connectionOptions: UIScene.ConnectionOptions) {
guard let windowScene = (scene as? UIWindowScene) else { return }

let tabBarController = TabBarViewController()

window = UIWindow(windowScene: windowScene)
window?.rootViewController = tabBarController
window?.makeKeyAndVisible()
}
}

154 changes: 154 additions & 0 deletions FE/MoodMeterDiary/MoodMeterDiary/Controller/DiaryViewController.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
//
// DiaryViewController.swift
// MoodMeterDiary
//
// Created by minsong kim on 1/23/24.
//

import UIKit

class DiaryViewController: UIViewController {
let happyLabel: UILabel = {
let label = UILabel()
label.font = .preferredFont(forTextStyle: .title3)
label.text = "HAPPINESS"

return label
}()

let happyDescriptionLabel: UILabel = {
let label = UILabel()
label.font = .preferredFont(forTextStyle: .body)
label.text = """
오늘 당신이 느낀 행복감의 정도는 어디인가요?
자주, 많이 기뻤나요?
하루의 삶이 만족스러웠나요?
아니면 생각이 많고, 마음이 무거웠나요?
"""
label.numberOfLines = 0
label.textAlignment = .center

return label
}()

let energyLabel: UILabel = {
let label = UILabel()
label.font = .preferredFont(forTextStyle: .title3)
label.text = "ENERGY"

return label
}()

let energyDescriptionLabel: UILabel = {
let label = UILabel()
label.font = .preferredFont(forTextStyle: .body)
label.text = """
오늘 당신의 에너지는 얼마만큼이었나요?
하루 종일 많은 것들을 할 힘이 남아돌았나요?
뛰어다니진 않아도 가벼운 발걸음이었나요?
아니면 기운이 없고 아무것도 하기 싫었나요?
"""
label.numberOfLines = 0
label.textAlignment = .center

return label
}()

let happySlider: UISlider = {
let slider = UISlider()
slider.minimumValue = 0
slider.maximumValue = 10
slider.value = 5
slider.maximumValueImage = UIImage(systemName: "hand.thumbsup.fill")
slider.minimumValueImage = UIImage(systemName: "hand.thumbsdown.fill")
slider.translatesAutoresizingMaskIntoConstraints = false

return slider
}()

let energySlider: UISlider = {
let slider = UISlider()
slider.minimumValue = 0
slider.maximumValue = 10
slider.value = 5
slider.maximumValueImage = UIImage(systemName: "sun.max.fill")
slider.minimumValueImage = UIImage(systemName: "cloud.drizzle.fill")
slider.translatesAutoresizingMaskIntoConstraints = false

return slider
}()

let submitButton: UIButton = {
let button = UIButton()
button.setTitle("제출하기", for: .normal)
button.backgroundColor = .gray

return button
}()

let happyStackView: UIStackView = {
let stackView = UIStackView()
stackView.axis = .vertical
stackView.alignment = .center
stackView.spacing = 8

return stackView
}()

let energyStackView: UIStackView = {
let stackView = UIStackView()
stackView.axis = .vertical
stackView.alignment = .center
stackView.spacing = 8

return stackView
}()

let stackView: UIStackView = {
let stackView = UIStackView()
stackView.translatesAutoresizingMaskIntoConstraints = false
stackView.axis = .vertical
stackView.distribution = .equalSpacing

return stackView
}()

override func viewDidLoad() {
super.viewDidLoad()
view.backgroundColor = .systemBackground
view.addSubview(stackView)

configureStackView()
configureSlider()
// configureLabel()
}

func configureStackView() {
happyStackView.addArrangedSubview(happyLabel)
happyStackView.addArrangedSubview(happyDescriptionLabel)
happyStackView.addArrangedSubview(happySlider)
energyStackView.addArrangedSubview(energyLabel)
energyStackView.addArrangedSubview(energyDescriptionLabel)
energyStackView.addArrangedSubview(energySlider)

stackView.addArrangedSubview(happyStackView)
stackView.addArrangedSubview(energyStackView)
stackView.addArrangedSubview(submitButton)

NSLayoutConstraint.activate([
stackView.leadingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.leadingAnchor, constant: 32),
stackView.trailingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.trailingAnchor, constant: -32),
stackView.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor, constant: 50),
stackView.bottomAnchor.constraint(equalTo: view.safeAreaLayoutGuide.bottomAnchor, constant: -100)
])
}

func configureSlider() {
NSLayoutConstraint.activate([
happySlider.leadingAnchor.constraint(equalTo: stackView.leadingAnchor),
happySlider.trailingAnchor.constraint(equalTo: stackView.trailingAnchor),
energySlider.leadingAnchor.constraint(equalTo: stackView.leadingAnchor),
energySlider.trailingAnchor.constraint(equalTo: stackView.trailingAnchor)
])
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
//
// MainViewController.swift
// MoodMeterDiary
//
// Created by mint on 1/17/24.
//

import UIKit

class MainViewController: UIViewController {
let calendarView: UICalendarView = {
let calendar = UICalendarView()
calendar.calendar = .current
calendar.locale = .current
calendar.fontDesign = .monospaced
calendar.translatesAutoresizingMaskIntoConstraints = false

return calendar
}()

override func viewDidLoad() {
super.viewDidLoad()
view.backgroundColor = .systemBackground
navigationItem.title = "MOODMETER"
configureCalendarView()
// Do any additional setup after loading the view.
}

func configureCalendarView() {
view.addSubview(calendarView)

NSLayoutConstraint.activate([
calendarView.leadingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.leadingAnchor),
calendarView.trailingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.trailingAnchor),
calendarView.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor),
calendarView.bottomAnchor.constraint(equalTo: view.safeAreaLayoutGuide.bottomAnchor)
])
}

}

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//
// ProfileViewController.swift
// MoodMeterDiary
//
// Created by minsong kim on 1/23/24.
//

import UIKit

class ProfileViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
view.backgroundColor = .systemMint
// Do any additional setup after loading the view.
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
//
// TabBarViewController.swift
// MoodMeterDiary
//
// Created by minsong kim on 1/23/24.
//

import UIKit

class TabBarViewController: UITabBarController {
override func viewDidLoad() {
super.viewDidLoad()

setUpViewControllers()
}

func setUpViewControllers() {
let main = UINavigationController(rootViewController: MainViewController())
let profile = UINavigationController(rootViewController: ProfileViewController())
let diary = UINavigationController(rootViewController: DiaryViewController())

main.tabBarItem.title = "달력"
profile.tabBarItem.title = "프로필"
diary.tabBarItem.title = "글쓰기"

main.tabBarItem.image = UIImage(systemName: "calendar")
profile.tabBarItem.image = UIImage(systemName: "person.circle.fill")
diary.tabBarItem.image = UIImage(systemName: "square.and.pencil")

viewControllers = [main, diary, profile]
}
}

23 changes: 23 additions & 0 deletions FE/MoodMeterDiary/MoodMeterDiary/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
<false/>
<key>UISceneConfigurations</key>
<dict>
<key>UIWindowSceneSessionRoleApplication</key>
<array>
<dict>
<key>UISceneConfigurationName</key>
<string>Default Configuration</string>
<key>UISceneDelegateClassName</key>
<string>$(PRODUCT_MODULE_NAME).SceneDelegate</string>
</dict>
</array>
</dict>
</dict>
</dict>
</plist>
15 changes: 15 additions & 0 deletions FE/MoodMeterDiary/MoodMeterDiary/Model/Member.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//
// Member.swift
// MoodMeterDiary
//
// Created by minsong kim on 1/26/24.
//

import Foundation

struct Member {
let id: String
let password: String
var name: String
var diaryCount: Int
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"colors" : [
{
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"images" : [
{
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading