SBLApplication 0.0.2

SBLApplication 0.0.2

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Mar 2017
SwiftSwift Version 3.0
SPMSupports SPM

Maintained by Takuya Otani.




  • By
  • Takuya Otani

SBLApplication

Example

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

Requirements

  • Swift 3
  • iOS9 or later

Installation

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

pod "SBLApplication"

You also need to introduce main.swift with the following code:

import SBLApplication

UIApplicationMain(
  CommandLine.argc,
  UnsafeMutableRawPointer(CommandLine.unsafeArgv).bindMemory(to: UnsafeMutablePointer<Int8>.self,
                                                             capacity: Int(CommandLine.argc)),
  NSStringFromClass(SBLApplication.self),
  NSStringFromClass(AppDelegate.self) // it should be matched to your AppDelegate class
)

and then remove @UIApplicationMain from your AppDelegate.

To enable touch indicator, you may need to cast an instance of UIApplication to SBLApplication:

import UIKit
import SBLApplication

class AppDelegate: UIResponder {
  // ... snip ...
  func application(_ application: UIApplication,
                   didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
    if let app = application as? SBLApplication {
      app.isShowingTouchIndicators = true
    }
    return true
  }
  // ... snip ...
}

Copyright

SBLApplication is developed by Takuya Otani / SimpleBoxes.

Copyright © 2017 Takuya Otani

Copyright © 2017 SerendipityNZ Ltd.

License

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