Skip to content

Commit

Permalink
Merge pull request #87 from Umpah-swim-wave/feature/85-bug-cardview-h…
Browse files Browse the repository at this point in the history
…eight

[BUG] 반 뷰 QA 해결
  • Loading branch information
YoonAh-dev authored Feb 18, 2022
2 parents c484080 + c9b70dd commit be8a183
Show file tree
Hide file tree
Showing 8 changed files with 68 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,18 @@
debugServiceExtension = "internal"
allowLocationSimulation = "YES"
launchAutomaticallySubstyle = "32">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<RemoteRunnable
runnableDebuggingMode = "2"
BundleIdentifier = "com.apple.Carousel"
RemotePath = "/Uhpuh WatchKit App">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "EDD43FE326483C9600C866F3"
BuildableName = "Umpah-iOS WatchKit App.app"
BlueprintName = "Umpah-iOS WatchKit App"
ReferencedContainer = "container:Umpah-iOS.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</RemoteRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand All @@ -73,16 +75,27 @@
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES"
launchAutomaticallySubstyle = "32">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<RemoteRunnable
runnableDebuggingMode = "2"
BundleIdentifier = "com.apple.Carousel"
RemotePath = "/Uhpuh WatchKit App">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "EDD43FE326483C9600C866F3"
BuildableName = "Umpah-iOS WatchKit App.app"
BlueprintName = "Umpah-iOS WatchKit App"
ReferencedContainer = "container:Umpah-iOS.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</RemoteRunnable>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "EDD43FE326483C9600C866F3"
BuildableName = "Umpah-iOS WatchKit App.app"
BlueprintName = "Umpah-iOS WatchKit App"
ReferencedContainer = "container:Umpah-iOS.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,33 +54,46 @@
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<RemoteRunnable
runnableDebuggingMode = "2"
BundleIdentifier = "com.apple.Carousel"
RemotePath = "/Uhpuh WatchKit App">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "EDD43FE326483C9600C866F3"
BuildableName = "Umpah-iOS WatchKit App.app"
BlueprintName = "Umpah-iOS WatchKit App"
ReferencedContainer = "container:Umpah-iOS.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</RemoteRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<RemoteRunnable
runnableDebuggingMode = "2"
BundleIdentifier = "com.apple.Carousel"
RemotePath = "/Uhpuh WatchKit App">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "EDD43FE326483C9600C866F3"
BuildableName = "Umpah-iOS WatchKit App.app"
BlueprintName = "Umpah-iOS WatchKit App"
ReferencedContainer = "container:Umpah-iOS.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</RemoteRunnable>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "EDD43FE326483C9600C866F3"
BuildableName = "Umpah-iOS WatchKit App.app"
BlueprintName = "Umpah-iOS WatchKit App"
ReferencedContainer = "container:Umpah-iOS.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ final class CardView: BaseView, Alertable {

switch cardViewState {
case .normal:
expandedView.routineFilterView.levelText = "레벨"
expandedView.routineFilterView.exceptionStrokeText = "제외할 영법"

normalView.fadeIn()
expandedView.fadeOut()
startAnimation()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,15 @@ final class ExpandedStateView: ExpandedStateTableView {
let storyboard = UIStoryboard(name: "ModifyElement", bundle: nil)
guard let nextVC = storyboard.instantiateViewController(withIdentifier: ModifyElementVC.identifier) as? ModifyElementVC else {return}

nextVC.sendFilterData = { [weak self] in
self?.rootVC?.setupCardViewState(to: .expanded)
}

nextVC.elementType = elementType
nextVC.modalPresentationStyle = .fullScreen
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1 , execute: {
nextVC.backgroundImage = self.rootVC?.view.asImage()
nextVC.modalTransitionStyle = .crossDissolve
self.rootVC?.present(nextVC, animated: true, completion: nil)
})
nextVC.backgroundImage = self.rootVC?.view.asImage()
nextVC.modalPresentationStyle = .overCurrentContext
nextVC.modalTransitionStyle = .crossDissolve
self.rootVC?.present(nextVC, animated: true, completion: nil)
}

private func setupModifyButton() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,17 @@ final class RoutineFilterView: BaseView {
var levelText = "레벨"
var exceptionStrokeText = "제외할 영법"

// MARK: - init

override init(frame: CGRect) {
super.init(frame: frame)
setAttributeRoutineButton(button: distanceOrderButton, title: "거리순")
}

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

override func render() {
addSubviews([levelButton,
exceptionButton,
Expand Down Expand Up @@ -56,7 +67,6 @@ final class RoutineFilterView: BaseView {
func setupRoutineHeader() {
setAttributeRoutineButton(button: levelButton, title: levelText)
setAttributeRoutineButton(button: exceptionButton, title: exceptionStrokeText)
setAttributeRoutineButton(button: distanceOrderButton, title: "거리순")
}

private func setAttributeRoutineButton(button: UIButton, title: String) {
Expand Down
4 changes: 2 additions & 2 deletions Umpah-iOS/Umpah-iOS/Screen/Main/Controller/MainCardVC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ class MainCardVC: BaseViewController {
case .expanded:
switch currentMainViewState {
case .week:
topConstraint = screenHeight * 0.24
topConstraint = screenHeight * 0.20
case .month:
topConstraint = screenHeight * 0.38
topConstraint = screenHeight * 0.35
default:
topConstraint = Size.defaultTopConstant
}
Expand Down
2 changes: 2 additions & 0 deletions Umpah-iOS/Umpah-iOS/Screen/Main/Controller/MainVC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ final class MainVC: MainTableVC {
private func changeStateWhenTappedHeaderTab(){
headerView.pressedTabIsRecord = { [weak self] isRecord in
guard let self = self else { return }
self.setupCardViewState(to: .normal)

if !isRecord && self.currentMainViewState != .routine {
self.cacheMainViewState = self.currentMainViewState
self.currentMainViewState = .routine
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ class ModifyElementVC: UIViewController{

private var contentViewHeight = 0

var sendFilterData: (() -> Void)?

private var dimmerView = UIView().then{
$0.backgroundColor = .black
$0.alpha = 0.6
Expand Down Expand Up @@ -103,9 +105,11 @@ class ModifyElementVC: UIViewController{
case .level:
let presentingVC = presentingViewController as? MainVC
presentingVC?.cardView.expandedView.routineFilterView.levelText = selectedContent ?? "레벨"
sendFilterData?()
case .exceptStorke:
let presentingVC = presentingViewController as? MainVC
presentingVC?.cardView.expandedView.routineFilterView.exceptionStrokeText = selectedContent ?? "제외할 영법"
sendFilterData?()
case .none:
elementList = []
}
Expand Down

0 comments on commit be8a183

Please sign in to comment.