-
Notifications
You must be signed in to change notification settings - Fork 0
DesignSystem 모듈 분리 및 구조 정리 #313
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
Merged
+2,480
−2
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
636697d
feat/#306: MLSDesignSystem 모듈 생성
pinocchio22 dac56c0
Merge branch 'dev' of github.com:Team-Maple/MLS-iOS into feat/#306-ML…
pinocchio22 c0b9eef
fix/#306: Core와 DesignSystem 모듈 의존성 분리
pinocchio22 1d65008
fix/#306: 오타 수정 및 주석 제거
pinocchio22 f33300b
fix/#306: Tabbar 숨김 처리를 각 Feature 모듈에서 직접 담당하도록 수정
pinocchio22 9e30686
style/#306: Apply SwiftLint autocorrect
github-actions[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
55 changes: 55 additions & 0 deletions
55
MLS/MLSCore/Sources/MLSCore/BaseController/BaseViewController.swift
This file contains hidden or 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,55 @@ | ||
| import os | ||
| import UIKit | ||
|
|
||
| import RxKeyboard | ||
| import RxSwift | ||
|
|
||
| open class BaseViewController: UIViewController { | ||
| private let disposeBag = DisposeBag() | ||
|
|
||
| public init() { | ||
| super.init(nibName: nil, bundle: nil) | ||
| os_log("➕init: \(String(describing: self))") | ||
| } | ||
|
|
||
| @available(*, unavailable) | ||
| public required init?(coder: NSCoder) { | ||
| fatalError("init(coder:) has not been implemented") | ||
| } | ||
|
|
||
| deinit { | ||
| os_log("➖deinit: \(String(describing: self))") | ||
| } | ||
| } | ||
|
|
||
| // MARK: - Life Cycle | ||
| extension BaseViewController { | ||
| override open func viewDidLoad() { | ||
| super.viewDidLoad() | ||
| configureUI() | ||
| } | ||
| } | ||
|
|
||
| // MARK: - SetUp | ||
| private extension BaseViewController { | ||
| func configureUI() { | ||
| navigationController?.navigationBar.isHidden = true | ||
| view.backgroundColor = .systemBackground | ||
| } | ||
| } | ||
|
|
||
| // MARK: - Methods | ||
| public extension BaseViewController { | ||
| func setupKeyboard(inset: CGFloat = 0, completion: @escaping (CGFloat) -> Void) { | ||
| RxKeyboard.instance.visibleHeight | ||
| .drive(onNext: { [weak self] height in | ||
| guard let self = self else { return } | ||
| let safeBottom = self.view.safeAreaInsets.bottom | ||
| let inset = height > 0 | ||
| ? height - safeBottom + inset | ||
| : inset | ||
| completion(inset) | ||
| }) | ||
| .disposed(by: disposeBag) | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.