-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from presto95/develop
3.02 - hotfix
- Loading branch information
Showing
20 changed files
with
183 additions
and
173 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// | ||
// Log.swift | ||
// RespectU | ||
// | ||
// Created by Presto on 14/03/2019. | ||
// Copyright © 2019 Presto. All rights reserved. | ||
// | ||
|
||
import UIKit | ||
|
||
/// 일반 로그 찍을 때 사용하기. | ||
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) { | ||
let fileName = file.split(separator: "/").last ?? "" | ||
let functionName = function.split(separator: "(").first ?? "" | ||
print("❌ [\(fileName)] \(functionName)(\(line)): \(message)") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 0 additions & 28 deletions
28
RespectU/Sources/Extension/MissionSection.Technika3+Gradient.swift
This file was deleted.
Oops, something went wrong.
37 changes: 37 additions & 0 deletions
37
RespectU/Sources/Extension/MissionSection.Technika3+UI.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// | ||
// MissionSection.Technika3+Gradient.swift | ||
// RespectU | ||
// | ||
// Created by Presto on 10/03/2019. | ||
// Copyright © 2019 Presto. All rights reserved. | ||
// | ||
|
||
import UIKit | ||
|
||
extension MissionSection.Technika3 { | ||
|
||
var color: UIColor? { | ||
switch self { | ||
case .popMixing: return .popMixing | ||
case .crewChallenge: return .crewChallenge | ||
} | ||
} | ||
|
||
func makeGradient(by direction: GradientDirection) -> CAGradientLayer? { | ||
let startPoint = direction.startPoint | ||
let endPoint = direction.endPoint | ||
let locations: [NSNumber] = [0, 0.5, 1] | ||
switch self { | ||
case .popMixing: | ||
return CAGradientLayer(startPoint: startPoint, | ||
endPoint: endPoint, | ||
colors: [#colorLiteral(red: 0.1490196078, green: 0.2666666667, blue: 0.3882352941, alpha: 1), #colorLiteral(red: 0.768627451, green: 0.6235294118, blue: 0.8666666667, alpha: 1)], | ||
locations: locations) | ||
case .crewChallenge: | ||
return CAGradientLayer(startPoint: startPoint, | ||
endPoint: endPoint, | ||
colors: [#colorLiteral(red: 0.1490196078, green: 0.2784313725, blue: 0.4039215686, alpha: 1), #colorLiteral(red: 0.6784313725, green: 0.6784313725, blue: 0.6784313725, alpha: 1)], | ||
locations: locations) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.