-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: Add RandomMusicQuiz logic - Reactor 기능 추가 #8 * feat: Add RandomMusicQuizView - view 추가 - 장르 선택 영역 추가 (변경 가능성 있음) #8 * feat: RandomMusicQuiz view, binding logic - view 수정 - state 와 action 바인딩 - Music model float 로 변경 - 음악 재생/중지 - 업데이트, 셔플 - 정답 보기 # 8 * feat: Add RandomMusic to home - 홈에서 RandomMusicQuiz 로 이동 가능하도록 추가 - 게임 모드를 enum 으로 변경 * style: Code reformatting - 들여쓰기 4개로 수정 * Revert "style: Code reformatting" This reverts commit d08979f. * refactor: modify style #13 - 재사용 않는 클래스 final 로 변경 - 모델 파일 분리 - 네이밍 수정 * fix: Fix infinite loading - 무한로딩되던 문제 해결 - ytPlayer 라이브러리에서 delegate 호출이 정상적으로 이루어지지 않아 발생 - ytPlayer 로의 요청중일 때 막는 방식으로 해결 * fix: Fix playing timer 비디오 재생과정은 아래와 같다. 1. 비디오 로드 // pending 2. 비디오 준비 // ready 3. 비디오 재생 명령 // .startVideo() 4-1. 비디오 버퍼링 // buffering 4-2. 비디오 재생 비디오 재생을 수행 시 버퍼링 과정이 포함되는데, 버퍼링 -> 재생까지의 시각이 매번 달라 YTPlayer 의 state 를 확인하여 재생되는 시점을 확인하고 재생되도록 하였음. - 다른 state (isReady) 와 같은 state 는 PlayerState 로 관리하도록 수정 - 재생 / 정지 동작을 명령할 state 네이밍 수정 fix #8 * fix: Fix playing time error 시간초 재생 후 시작을 눌렀을 때 시간초 재생이 이루어지던 오류 수정 Co-authored-by: JaeWook Lee <[email protected]>
- Loading branch information
Showing
11 changed files
with
623 additions
and
60 deletions.
There are no files selected for viewing
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,13 @@ | ||
// | ||
// GameMode.swift | ||
// LiarGame | ||
// | ||
// Created by JK on 2022/04/26. | ||
// | ||
|
||
import Foundation | ||
|
||
enum GameMode { | ||
case liarGame | ||
case randomMusicQuiz | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// | ||
// Flex+Extensions.swift | ||
// LiarGame | ||
// | ||
// Created by JK on 2022/04/26. | ||
// | ||
|
||
import Foundation | ||
import CoreGraphics | ||
import FlexLayout | ||
|
||
extension Flex { | ||
@discardableResult | ||
func horizontallySpacing(_ value: CGFloat?) -> Flex { | ||
guard let view = view, view.subviews.count > 1 else { return self } | ||
for (idx, subview) in view.subviews.enumerated() { | ||
if idx == 0 { continue } | ||
subview.flex.marginLeft(value ?? 0) | ||
} | ||
return self | ||
} | ||
|
||
@discardableResult | ||
func verticallySpacing(_ value: CGFloat?) -> Flex { | ||
guard let view = view, view.subviews.count > 1 else { return self } | ||
for (idx, subview) in view.subviews.enumerated() { | ||
if idx == 0 { continue } | ||
subview.flex.marginTop(value ?? 0) | ||
} | ||
return self | ||
} | ||
} |
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,21 @@ | ||
// | ||
// UIColor+Extensions.swift | ||
// LiarGame | ||
// | ||
// Created by JK on 2022/04/26. | ||
// | ||
|
||
import UIKit | ||
|
||
extension UIColor { | ||
convenience init(hexString : String) { | ||
if let rgbValue = UInt(hexString, radix: 16) { | ||
let red = CGFloat((rgbValue >> 16) & 0xff) / 255 | ||
let green = CGFloat((rgbValue >> 8) & 0xff) / 255 | ||
let blue = CGFloat((rgbValue ) & 0xff) / 255 | ||
self.init(red: red, green: green, blue: blue, alpha: 1.0) | ||
} else { | ||
self.init(red: 0.0, green: 0.0, blue: 0.0, alpha: 1.0) | ||
} | ||
} | ||
} |
Oops, something went wrong.