Skip to content

SwiftlyPresent is very Ez Present!! πŸ˜€ πŸ‘» πŸ§‘β€πŸ’»

License

Notifications You must be signed in to change notification settings

jungseungyeo/SwiftlyPresent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

14 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

SwiftlyPresent

CI Status Version License Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

SwiftlyPresent is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'SwiftlyPresent'

How to Use

// 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)

Author

jungseungyeo, [email protected]

License

SwiftlyPresent is available under the MIT license. See the LICENSE file for more info.

About

SwiftlyPresent is very Ez Present!! πŸ˜€ πŸ‘» πŸ§‘β€πŸ’»

Resources

License

Stars

Watchers

Forks

Packages

No packages published