Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] 칭찬 카드서랍 버그 수정 #65

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
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
4 changes: 2 additions & 2 deletions Whale-iOS/Whale-iOS.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1188,7 +1188,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1.6;
CURRENT_PROJECT_VERSION = 1.8;
DEVELOPMENT_TEAM = 2ZS26WP93H;
INFOPLIST_FILE = "$(SRCROOT)/Whale-iOS/Support/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 14.1;
Expand All @@ -1211,7 +1211,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1.6;
CURRENT_PROJECT_VERSION = 1.8;
DEVELOPMENT_TEAM = 2ZS26WP93H;
INFOPLIST_FILE = "$(SRCROOT)/Whale-iOS/Support/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 14.1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,11 @@ class CircularGradientProgressBar: UIView {
@IBInspectable public lazy var foregroundCircleColor: UIColor = UIColor.red
@IBInspectable public lazy var startGradientColor: UIColor = UIColor.red
@IBInspectable public lazy var endGradientColor: UIColor = UIColor.orange
// @IBInspectable public lazy var textColor: UIColor = UIColor.white

private lazy var fillColor: UIColor = UIColor.clear

private var backgroundLayer: CAShapeLayer!
private var progressLayer: CAShapeLayer!
// private var textLayer: CATextLayer!

public var progress: CGFloat = 0 {
didSet {
Expand Down Expand Up @@ -59,12 +57,9 @@ class CircularGradientProgressBar: UIView {
gradientLayer.colors = [startGradientColor.cgColor, endGradientColor.cgColor]
gradientLayer.frame = self.bounds
gradientLayer.mask = progressLayer

// textLayer = createTextLayer(textColor: textColor)

layer.addSublayer(backgroundLayer)
layer.addSublayer(gradientLayer)
// layer.addSublayer(textLayer)
}

private func createCircularLayer(strokeColor: CGColor, fillColor: CGColor, lineWidth: CGFloat) -> CAShapeLayer {
Expand All @@ -91,29 +86,8 @@ class CircularGradientProgressBar: UIView {

return shapeLayer
}

// private func createTextLayer(textColor: UIColor) -> CATextLayer {
//
// let width = frame.size.width
// let height = frame.size.height
//
// let fontSize = min(width, height) / 4 - 5
// let offset = min(width, height) * 0.1
//
// let layer = CATextLayer()
// layer.string = "\(Int(progress * 100))"
// layer.backgroundColor = UIColor.clear.cgColor
// layer.foregroundColor = textColor.cgColor
// layer.fontSize = fontSize
// layer.frame = CGRect(x: 0, y: (height - fontSize - offset) / 2, width: width, height: height)
// layer.alignmentMode = .center
//
// return layer
// }

private func didProgressUpdated() {

// textLayer?.string = "\(Int(progress * 100))"
private func didProgressUpdated() {
progressLayer?.strokeEnd = progress
}
}
Expand All @@ -135,15 +109,6 @@ extension CircularGradientProgressBar {
basicAnimation.delegate = self

timer = AppTimer(duration: maxDuration, tickInterval: tickInterval)

// timer?.timerFired = { [weak self] value in
// self?.textLayer.string = "\(value)"
// }
//
// timer?.timerStopped = { [weak self] in
// self?.textLayer.string = ""
// }

timer?.timerCompleted = {}

progressLayer.add(basicAnimation, forKey: "recording")
Expand Down
10 changes: 2 additions & 8 deletions Whale-iOS/Whale-iOS/Screens/PraiseCardTab/VC/PraiseCardVC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -476,14 +476,9 @@ extension PraiseCardVC {
func praiseCardService(_ year: String, _ month: String) {

var convertMonthString: String = "0"
if month < 10.toString() {
convertMonthString = "0" + month
}
else {
convertMonthString = month
}
convertMonthString = Int(month) ?? 0 < 10 ? "0" + month : month

PraiseService.shared.praiseDateService(year: year, month: convertMonthString) { [self](networkResult) -> (Void) in
PraiseService.shared.praiseDateService(year: year, month: convertMonthString) { [self] (networkResult) -> (Void) in
switch networkResult {
case .success(let data):
if let praiseData = data as? PraiseData {
Expand Down Expand Up @@ -519,7 +514,6 @@ extension PraiseCardVC {
switch networkResult {
case .success(let data):
if let praiseRank = data as? PraiseRankData {
print(praiseRank.rankingCountResult)
praiseRankData = praiseRank.rankingCountResult

if praiseRank.totalPraiserCount == 0 {
Expand Down
2 changes: 2 additions & 0 deletions Whale-iOS/Whale-iOS/Support/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>칭찬할고래</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
Expand Down