Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nucleus-inc/nusignup
This is a project with the basic configuration for a sign up flow.
https://github.com/nucleus-inc/nusignup
cocoapods ios ios-app ios-swift signup swift4
Last synced: about 1 month ago
JSON representation
This is a project with the basic configuration for a sign up flow.
- Host: GitHub
- URL: https://github.com/nucleus-inc/nusignup
- Owner: Nucleus-Inc
- License: mit
- Created: 2016-12-06T20:27:50.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2019-05-07T12:28:42.000Z (over 5 years ago)
- Last Synced: 2024-12-02T03:40:59.611Z (about 1 month ago)
- Topics: cocoapods, ios, ios-app, ios-swift, signup, swift4
- Language: Swift
- Homepage:
- Size: 271 KB
- Stars: 1
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# NuSignUp
[![CI Status](http://img.shields.io/travis/Nucleus-Inc/NuSignUp.svg?style=flat)](https://travis-ci.org/Nucleus-Inc/NuSignUp)
[![Version](https://img.shields.io/cocoapods/v/NuSignUp.svg?style=flat)](http://cocoapods.org/pods/NuSignUp)
[![License](https://img.shields.io/cocoapods/l/NuSignUp.svg?style=flat)](http://cocoapods.org/pods/NuSignUp)
[![Platform](https://img.shields.io/cocoapods/p/NuSignUp.svg?style=flat)](http://cocoapods.org/pods/NuSignUp)## Example
To run the example project, clone the repo, and run `pod install` from the Example directory first.
## Requirements
iOS 10.0+
## Installation
NuSignUp is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:```ruby
pod "NuSignUp"
```### Step 1: Create a storyboard to contain your sign up flow.
### Step 2: Setting up your SignUpStackC (Optional).
This protocol exists to help user knows about his progress on sign up.
Take a look on example project for ways to use it.Each SignUpStepVC will access your instance of `SignUpStackC` by `self.parent` param on `viewWillAppear` only to update the current step value calling the method `updateForStep`, where on your implementation you should update for example your `UIProgressView` progress.
```swift
override open func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
...
if let navc = self.navigationController as? SignUpStackC{
navc.updateForStep(step: stepNumber)
}
...
}
```### Step 3: Your Sign Up Steps.
Each Sign Up Step VC must implement `SignUpStepController`.
Steps that are an instance of `SignUpStepVC` or `SignUpNameSVC` or inherits from one of them have by default its delegate value equals to `DefaultSUpSDelegate` instance.
Probably you will need to make your changes and `DefaultSUpSDelegate` implementation of `SignUpStepDelegate` protocol will not be enough, for these cases you have two options:
- Option 1: Your Step is an instance of `SignUpStepVC` or `SignUpNameSVC`.
You can change its `delegate` param value by calling:
```swift
SignUpStack.config.baseStepDelegateType(ExampleSignUpDelegate.self)
```Remember that doing it all your steps that are an instance of `SignUpStepVC` will use `ExampleSignUpDelegate` instance as its delegate.
- Option 2: Your Step inherits from `SignUpStepVC` or `SignUpNameSVC`.
Only change its delegate value.
Take a look on Example project specifically on `SignUpCodeSVC` class for a safe way to do it.
### Step 4: Going to next Sign Up Step.
`SignUpStepController` has a method called `goToNextStep` that on `SignUpStepVC` instance executes diferent transitions accordinly to `delegate.reviewMode`.
### Do not forget to take a look on example project.
## Author
José Lucas, [email protected]
## License
NuSignUp is available under the MIT license. See the LICENSE file for more info.