IvanVorobei / Nativelogin
Programming Languages
Projects that are alternatives of or similar to Nativelogin
About
This project simplifies work with forms of authorization and uses native elements that Apple recommends and uses. It may seem that such elements are ready in the system, but as it turned out - no. I did a lot of work to repeat the visual reference
[please, wait loading animated preview]
Requirements
Xcode 9 and Swift 4. Ready for use on iOS 9+
Integration
Drop in Sparrow
folder to your Xcode project (make sure to enable "Copy items if needed" and "Create groups").
Or via CocoaPods:
pod 'Sparrow', :git => 'https://github.com/IvanVorobei/Sparrow.git'
How to use
Create new class with name LoginNavigationController
and inherit SPNativeLoginNavigationController
class LoginNavigationController: SPNativeLoginNavigationController {}
You must implement in LoginNavigationController
the next functions (otherwise get fatal error):
override func login(with login: String, password: String, complection: @escaping (SPOauthState) -> ()) {
}
override func login(with code: String, complection: @escaping (SPOauthState) -> ()) {
}
Inside the functions, you should do the work with authorization (for example, http requests) and at the end of authorization call the package. Pass in complection status of authorization
Customize
If you want to customize the content (keyboard type or text) you should ovveride property
class LoginNavigationController: SPNativeLoginNavigationController {
override var loginContent: SPNativeLoginNavigationController.LoginContent {
var content = LoginContent()
content.navigationTitle = "Sign In"
content.loginTitle = "Login"
content.loginPlaceholder = "[email protected]"
content.loginKeyboardType = .emailAddress
content.passwordTitle = "Password"
content.passwordPlaceholder = "Required"
content.commentTitle = "Please enter a pair of login and password"
content.buttonTitle = "Sign In"
content.errorOauthTitle = "Error"
content.errorOauthSubtitle = "Invalid login or password"
content.errorOauthButtonTitle = "Ok"
return content
}
}
For CodeController need ovveride loginCodeContent
. You do not need to override all values, some you can ignore
Questions and Problems
If you have trouble with porject - contact me via email
You need to develop a UI?
You can contact me and order the development of an application or UI with excellent animations. Contact with me via email: [email protected]
Apps, using NativeLogin
I like the idea to specify applications that use NativeLogin. Please, contact me via email (you can find it in the section "Contacts") so that I added app here
License
NativeLogin is released under the MIT license. Check LICENSE.md for details
Other
In the project you can find my library Sparrow. It's a library, on which the module is written. Unfortunately, to save time in development, I wrote NativeLogin using this library. Don't worry, within just Swift files and a lot of useful things. Maybe you will like it:)
Contact
Support
The project is fully free, I do not impose any restrictions on its use. I'm, just like you, want to do useful things. If you have a desire to help, tell friends about the project or donate. Thanks!