-
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 remote-tracking branch 'origin/develop' into develop
- Loading branch information
Showing
108 changed files
with
6,104 additions
and
6,304 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file modified
BIN
+23.5 KB
(120%)
...arner-dan-uh.xcworkspace/xcuserdata/ihyun_wook.xcuserdatad/UserInterfaceState.xcuserstate
Binary file not shown.
Binary file modified
BIN
+25.7 KB
(130%)
...h/Darner-dan-uh.xcworkspace/xcuserdata/munjisu.xcuserdatad/UserInterfaceState.xcuserstate
Binary file not shown.
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
67 changes: 67 additions & 0 deletions
67
...uh/Darner-dan-uh/Source 2/ViewModel/Modules/Memorization/MemorizationViewController.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,67 @@ | ||
// | ||
// MemorizationVC.swift | ||
// Darner-dan-uh | ||
// | ||
// Created by 이현욱 on 2020/10/08. | ||
// Copyright © 2020 이현욱. All rights reserved. | ||
// | ||
|
||
import UIKit | ||
|
||
import RxSwift | ||
import RxCocoa | ||
final class MemorizationViewController: UIViewController { | ||
|
||
var wordtupeStr: String! | ||
var wordtypeInt: Int! | ||
private let disposeBag = DisposeBag() | ||
|
||
@IBOutlet weak var memorizeTapItem: UINavigationItem! | ||
@IBOutlet weak var myPageBtn: UIButton! | ||
@IBOutlet weak var lawBtn: UIButton! | ||
@IBOutlet weak var traditionBtn: UIButton! | ||
@IBOutlet weak var artBtn: UIButton! | ||
@IBOutlet weak var harborBtn: UIButton! | ||
@IBOutlet weak var agricultureBtn: UIButton! | ||
@IBOutlet weak var militaryBtn: UIButton! | ||
@IBOutlet weak var electricalEnergyBtn: UIButton! | ||
@IBOutlet weak var coalBtn: UIButton! | ||
|
||
override func viewDidLoad() { | ||
super.viewDidLoad() | ||
bindAction() | ||
} | ||
|
||
override func viewWillAppear(_ animated: Bool) { | ||
super.viewWillAppear(animated) | ||
self.tabBarController?.tabBar.isHidden = false | ||
} | ||
} | ||
|
||
extension MemorizationViewController { | ||
private func bindAction() { | ||
Observable.merge(lawBtn.rx.tap.map { self.wordtupeStr = "법률"; self.wordtypeInt = 1 }, | ||
traditionBtn.rx.tap.map { self.wordtupeStr = "전통"; self.wordtypeInt = 2 }, | ||
artBtn.rx.tap.map { self.wordtupeStr = "예술"; self.wordtypeInt = 3 }, | ||
harborBtn.rx.tap.map { self.wordtupeStr = "항구"; self.wordtypeInt = 4 }, | ||
agricultureBtn.rx.tap.map { self.wordtupeStr = "농업"; self.wordtypeInt = 5 }, | ||
militaryBtn.rx.tap.map { self.wordtupeStr = "군사"; self.wordtypeInt = 6 }, | ||
electricalEnergyBtn.rx.tap.map { self.wordtupeStr = "전력"; self.wordtypeInt = 7 }, | ||
coalBtn.rx.tap.map { self.wordtupeStr = "석탄"; self.wordtypeInt = 8 } | ||
).debounce(.nanoseconds(1), scheduler: MainScheduler.instance) | ||
.subscribe { _ in | ||
let vc = self.makeVC(storyBoardName: .memo, identifier: .selectwordNumVC) as SelectWordNumViewController | ||
vc.wordTypeStr = self.wordtupeStr | ||
vc.wordTypeInt = self.wordtypeInt | ||
self.navigationController?.pushViewController(vc, animated: true) | ||
}.disposed(by: disposeBag) | ||
|
||
myPageBtn.rx.tap | ||
.debounce(.nanoseconds(1500), scheduler: MainScheduler.instance) | ||
.subscribe({ _ in | ||
let vc = self.makeVC(storyBoardName: .myPage, identifier: ViewControllerName.myCharacterVC) | ||
self.present(vc, animated: true, completion: nil) | ||
}) | ||
.disposed(by: disposeBag) | ||
} | ||
} |
Oops, something went wrong.