Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
jayn2u committed Aug 30, 2024
2 parents 4f0ec45 + 6b084ed commit b06cb97
Show file tree
Hide file tree
Showing 19 changed files with 614 additions and 350 deletions.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Bug Report
about: 버그를 신고합니다.
title: "[BugFix]"
labels: "\U0001F6E0️ BugFix"
assignees: jayn2u, SeungEEE, SeungWon1125

---

## 🛠️ Bug Report

### ⚠️ 설명

> 버그에 대해서 설명해주세요!
- 예시: 로그인 화면 구현

### 📝 ETC

> 기타 설명이 필요하다면 작성해주세요!
26 changes: 0 additions & 26 deletions .github/ISSUE_TEMPLATE/bugfix.md

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,26 +1,22 @@
---
name: Feature
name: New Feature Task
about: 기능구현, 리팩토링, 환경설정 등을 포함한 기본 템플릿
title: ''
labels: ''
title: "[Feat]"
labels: "\U0001F4F2 Feature"
assignees: ''

---

# 🍎 빈주머니즈 iOS 피처 구현
## 📲 New Feature Task

## 💡 Description
### ✅ 할 일 목록

> 해야 할 업무에 대해서 설명해주세요!
- 예시: 로그인 화면 구현

## ✅ To Do List

- [ ] 할 일
- [ ] 할 일
- [ ] 할 일

## 📝 ETC
### 🗂️ 첨부자료

> 기타 설명이 필요하다면 작성해주세요!
18 changes: 18 additions & 0 deletions .github/ISSUE_TEMPLATE/refactoring-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
name: Refactoring Request
about: 리팩터링할 항목을 요청 및 제안합니다.
title: "[Refactor] "
labels: "\U0001F9F0 Refactor"
assignees: ''

---

## 🧰 Refactoring Request

### 📝 설명

> 해당 항목에 대해서 설명해주세요.
### 🗂️ 첨부자료

> 첨부자료가 있다면 첨부해주세요.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ final class MainRouterTests: XCTestCase {

do {
let decodedData = try JSONDecoder().decode(
APIResponseMainPageResponseDto.self, from: response.data)
ApiResponseMainPageResponseDto.self, from: response.data)
debugPrint("/main API에서 가져온 데이터 디코딩 성공")
debugPrint(decodedData)
} catch (let error) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,9 @@ extension UIViewController {
navigationItem.leftBarButtonItem = backButton
}
}

extension UIViewController {
func hasPreviousViewController() -> Bool {
return self.navigationController?.viewControllers.count ?? 0 > 1
}
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
//
// APIResponseMainPageResponseDto.swift
// ApiResponseMainPageResponseDto.swift
// BudgetBuddies
//
// Created by Jiwoong CHOI on 8/15/24.
//

import Foundation

struct APIResponseMainPageResponseDto: Codable {
struct ApiResponseMainPageResponseDto: Codable {
let isSuccess: Bool
let code: String
let message: String
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,9 @@ extension CategoryPlusViewController {
switch result {
case .success(let response):
do {
let decodedData = try JSONDecoder().decode(CategoryResponseDTO.self, from: response.data)
} catch (let decodingError){
let decodedData = try JSONDecoder().decode(
CategoryResponseDTO.self, from: response.data)
} catch (let decodingError) {
seal.reject(decodingError)
}
seal.fulfill(())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,16 @@ final class ConsumeViewController: UIViewController {
해야 할 일
1. rightBarButtonItem의 색상을 Asset에 등록하고 사용하도록 설계
*/

self.navigationController?.setNavigationBarHidden(false, animated: true)
navigationItem.rightBarButtonItem?.tintColor = UIColor(
red: 0.463, green: 0.463, blue: 0.463, alpha: 1)

self.setupDefaultNavigationBar(backgroundColor: BudgetBuddiesAsset.AppColor.white.color)
// 이전 뷰컨이 있으면 백 버튼 표시
if self.hasPreviousViewController() {
self.addBackButton(selector: #selector(didTapBarButton))
}

}

Expand Down Expand Up @@ -127,6 +133,11 @@ final class ConsumeViewController: UIViewController {
// MARK: - Object C Methods

extension ConsumeViewController {
@objc
private func didTapBarButton() {
self.navigationController?.popViewController(animated: true)
}

@objc
private func dateChanged(_ sender: UIDatePicker) {
self.selectedDate = sender.date
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,37 +7,43 @@

import UIKit

class RootTabBarController: CustomTabBarController {
final class RootTabBarController: CustomTabBarController {

// MARK: - Properties

// Controller
// Model
internal let mainModel: MainModel

public let mainViewController: MainViewController!
public let consumeViewController: ConsumeViewController!
public let calendarViewController: CalendarViewController!
public let allLookingViewController: AllLookingViewController!
// Controller
internal let mainViewController: MainViewController
internal let consumeViewController: ConsumeViewController
internal let calendarViewController: CalendarViewController
internal let allLookingViewController: AllLookingViewController

private let mainViewNavigationController: UINavigationController!
private let consumeViewNavigationController: UINavigationController!
private let calendarViewNavigationController: UINavigationController!
private let allLookingViewNavigationController: UINavigationController!
// Navigtation Controller
private let mainViewNavigationController: UINavigationController
private let consumeViewNavigationController: UINavigationController
private let calendarViewNavigationController: UINavigationController
private let allLookingViewNavigationController: UINavigationController

override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) {
init(userId: Int) {
self.mainModel = MainModel(userId: userId)

mainViewController = MainViewController()
consumeViewController = ConsumeViewController()
calendarViewController = CalendarViewController()
allLookingViewController = AllLookingViewController()
self.mainViewController = MainViewController(mainModel: self.mainModel)
self.consumeViewController = ConsumeViewController()
self.calendarViewController = CalendarViewController()
self.allLookingViewController = AllLookingViewController()

mainViewNavigationController = UINavigationController(rootViewController: mainViewController)
consumeViewNavigationController = UINavigationController(
rootViewController: consumeViewController)
calendarViewNavigationController = UINavigationController(
rootViewController: calendarViewController)
allLookingViewNavigationController = UINavigationController(
rootViewController: allLookingViewController)
self.mainViewNavigationController = UINavigationController(
rootViewController: self.mainViewController)
self.consumeViewNavigationController = UINavigationController(
rootViewController: self.consumeViewController)
self.calendarViewNavigationController = UINavigationController(
rootViewController: self.calendarViewController)
self.allLookingViewNavigationController = UINavigationController(
rootViewController: self.allLookingViewController)

super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil)
super.init(nibName: nil, bundle: nil)
}

required init?(coder: NSCoder) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,27 @@ class ExtendedLaunchScreenViewController: UIViewController {
// MARK: - Properties

// View Properties
private let extendedLaunchScreenView = ExtendedLaunchScreenView()
private let extendedLaunchScreenView: ExtendedLaunchScreenView!

// Controller Properties
private let rootTabBarController = RootTabBarController()
private let rootTabBarController: RootTabBarController!

// Variable Properties
private let userId = 1
private static let userId = 1

// MARK: - Intializer

init() {
self.extendedLaunchScreenView = ExtendedLaunchScreenView()
self.rootTabBarController = RootTabBarController(
userId: ExtendedLaunchScreenViewController.userId)

super.init(nibName: nil, bundle: nil)
}

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

// MARK: - View Life Cycle

Expand All @@ -32,18 +46,18 @@ class ExtendedLaunchScreenViewController: UIViewController {

override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
self.fetchMainModelData()
self.fetchModelDataFromServer()
Thread.sleep(forTimeInterval: 3)
self.connectRootTabBarController()
}

// MARK: - Methods

private func fetchMainModelData() {
self.rootTabBarController.mainViewController.fetchUserDataFromServer(userId: self.userId)
self.rootTabBarController.mainViewController.fetchDataFromMainPageAPI(userId: self.userId)
private func fetchModelDataFromServer() {
self.rootTabBarController.mainModel.reloadDataFromServer()
self.rootTabBarController.calendarViewController.setupData()
self.rootTabBarController.allLookingViewController.fetchUserData(userId: self.userId)
self.rootTabBarController.allLookingViewController.fetchUserData(
userId: ExtendedLaunchScreenViewController.userId)
}

private func connectRootTabBarController() {
Expand Down
Loading

0 comments on commit b06cb97

Please sign in to comment.