Skip to content

Commit

Permalink
Merge pull request #212 from boostcamp3-iOS/develop
Browse files Browse the repository at this point in the history
LastLast Master Commit!
  • Loading branch information
presto95 authored Feb 25, 2019
2 parents 6e3399d + 4705739 commit 36a4b68
Show file tree
Hide file tree
Showing 14 changed files with 47 additions and 63 deletions.
68 changes: 26 additions & 42 deletions FineDust.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

12 changes: 1 addition & 11 deletions FineDust/Common/FDCountingLabel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,7 @@ final class FDCountingLabel: UILabel {

/// 타이머.
private var timer: Timer?

// MARK: Initializer

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

required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
}


/// 값이 없을 때 설정.
func setNoValue(_ defaultText: String = "-") {
text = defaultText
Expand Down
10 changes: 8 additions & 2 deletions FineDust/Common/Log.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,21 @@

import UIKit

func debugLog(_ message: Any, file: String = #file, function: String = #function, line: Int = #line) {
func debugLog(_ message: Any,
file: String = #file,
function: String = #function,
line: Int = #line) {
#if DEBUG
let fileName = file.split(separator: "/").last ?? ""
let functionName = function.split(separator: "(").first ?? ""
print("👻 [\(fileName)] \(functionName)(\(line)): \(message)")
#endif
}

func errorLog(_ message: Any, file: String = #file, function: String = #function, line: Int = #line) {
func errorLog(_ message: Any,
file: String = #file,
function: String = #function,
line: Int = #line) {
let fileName = file.split(separator: "/").last ?? ""
let functionName = function.split(separator: "(").first ?? ""
print("❌ [\(fileName)] \(functionName)(\(line)): \(message)")
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions FineDust/Statistics/GraphDrawable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//

import Foundation
import UIKit

/// 그래프를 그리는 프로토콜.
protocol GraphDrawable: class {
Expand Down
2 changes: 1 addition & 1 deletion FineDust/Statistics/IntakeData.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ struct IntakeData {
var todayUltrafineDust: Int = 1

/// 초기화.
mutating func reset(_ intakeData: IntakeData) {
mutating func reset(to intakeData: IntakeData) {
self = intakeData
}
}
5 changes: 4 additions & 1 deletion FineDust/Statistics/IntakeRequestable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//

import Foundation
import UIKit

/// 흡입량을 호출하는 프로토콜.
protocol IntakeRequestable: class {
Expand All @@ -30,7 +31,9 @@ protocol IntakeRequestable: class {
var requestIntakeHandler: (IntakeData?, Error?) -> Void { get }
}

extension IntakeRequestable {
// MARK: - IntakeRequestable 프로토콜 초기 구현

extension IntakeRequestable where Self: UIViewController {

func injectDependency(_ intakeService: IntakeServiceType,
_ coreDataService: CoreDataServiceType) {
Expand Down
4 changes: 2 additions & 2 deletions FineDust/Statistics/StatisticsViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ extension StatisticsViewController: IntakeRequestable {
return
}
guard let intakeData = intakeData else { return }
self.intakeData.reset(intakeData)
self.intakeData.reset(to: intakeData)
DispatchQueue.main.async {
self.initializeGraphViews()
}
Expand Down Expand Up @@ -194,7 +194,7 @@ private extension StatisticsViewController {
weekUltrafineDust: lastSavedData.weekUltrafineDust,
todayFineDust: lastSavedData.todayFineDust,
todayUltrafineDust: lastSavedData.todayUltrafineDust)
self.intakeData.reset(intakeData)
self.intakeData.reset(to: intakeData)
DispatchQueue.main.async {
self.initializeGraphViews()
}
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@

## 팀원 정보

**[intmain](https://github.com/intmain)**
⭐️ 튜터 오진성 [@intmain](https://github.com/intmain)

[Jae-eun](https://github.com/Jae-eun)
이재은 [@Jae-eun](https://github.com/Jae-eun)

[zunzunzun](https://github.com/zunzunzun)
이준상 [@zunzunzun](https://github.com/zunzunzun)

[presto95](https://github.com/presto95)
이한결 [@presto95](https://github.com/presto95)

## 기획

Expand Down
Binary file modified images/module.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 36a4b68

Please sign in to comment.