To run the example project, clone the repo, and run pod install
from the Example directory first.
SwiftlyPresent is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'SwiftlyPresent'
// MARK: - Single view
mainView.signUpButton.tapPublisher
.flatMap { [unowned self] _ in
return SignUpViewController.instance().presentedWithNavigation(on: self).eraseToAnyPublisher()
}.sink { [weak self] model in
guard let self = self else { return }
self.mainView.emailName.text = model.name
self.mainView.passWordName.text = model.password
}.store(in: &cancellables)
// MARK: - ChainPresent
mainView.chainButton.tapPublisher
.flatMap { [unowned self] _ in
// Email화면
return SignUpEmailViewController.instance().presentedWithNavigation(on: self).eraseToAnyPublisher()
}.flatMap { promiseData in
// password 화면
return SignUpPassWordViewController.instance(data: promiseData).pushViewController(animated: true).eraseToAnyPublisher()
}.sink { [weak self] model in
guard let self = self else { return }
self.mainView.emailName.text = model.name
self.mainView.passWordName.text = model.password
}.store(in: &cancellables)
jungseungyeo, duwjdtmd91@gmail.com
SwiftlyPresent is available under the MIT license. See the LICENSE file for more info.