Latest 0.1.1
Homepage https://github.com/torlopov-andrey/SuspendedViewStub
License MIT
Platforms ios 8.0
Frameworks UIKit
Authors

CI Status
Version
License
Platform

About

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.

About

Installation

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

pod "SuspendedViewStub"

Example

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

How it use

  • In your project add the following line to your Podfile:
pod "SuspendedViewStub"

In your project you have 2 ways:

  • Use colored view. Than you write in AppDelegate.swift:
func applicationDidEnterBackground(_ application: UIApplication) {
SuspendedViewStub.setStub(color: .green)
}
  • Use custom controller. Than you write in 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)
}
  • Important to write in AppDelegate.swift next code:
func applicationWillEnterForeground(_ application: UIApplication) {
//This code is required!
SuspendedViewStub.removeStub() 
}

That’s all

Author

[email protected]

skype: torlopov.andrey

License

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

Latest podspec

{
    "name": "SuspendedViewStub",
    "version": "0.1.1",
    "summary": "A simple view stub for application suspend mode",
    "description": "A simple view stub for ios application suspend mode.",
    "homepage": "https://github.com/torlopov-andrey/SuspendedViewStub",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Torlopov Andrey": "[email protected]"
    },
    "source": {
        "git": "https://github.com/torlopov-andrey/SuspendedViewStub.git",
        "tag": "0.1.1"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "SuspendedViewStub/Classes/**/*",
    "frameworks": "UIKit",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This