TestsTested | ✗ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | May 2017 |
SwiftSwift Version | 3.0 |
SPMSupports SPM | ✗ |
Maintained by Torlopov Andrey.
It’s my first pod, and if you find bugs, or some question - write me on email, or make issue in this repo.
It is just simple stub for your application, when you press home button. The main window is covered by a view of a specific color or your custom controller. Additionally, you can set autoclosing when your app resets foreground mode. In demo, I use custom controller with password field.
SuspendedViewStub is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "SuspendedViewStub"
To run the example project, clone the repo, and run pod install
from the Example directory first.
Podfile
:pod "SuspendedViewStub"
In your project you have 2 ways:
AppDelegate.swift
:func applicationDidEnterBackground(_ application: UIApplication) {
SuspendedViewStub.setStub(color: .green)
}
AppDelegate.swift
:func applicationDidEnterBackground(_ application: UIApplication) {
SuspendedViewStub.setStub(sceneName: CONTROLLER_IDENTITY, autocomplete: false)
//By default storyboardname is "Main" and autocomplete is true.
SuspendedViewStub.setStub(sceneName: CONTROLLER_IDENTITY, storyboardName: STORYBOARD_NAME, autocomplete: false)
}
AppDelegate.swift
next code:func applicationWillEnterForeground(_ application: UIApplication) {
//This code is required!
SuspendedViewStub.removeStub()
}
That’s all
skype: torlopov.andrey
SuspendedViewStub is available under the MIT license. See the LICENSE file for more info.