测试已测试 | ✗ |
语言语言 | SwiftSwift |
许可 | MIT |
发布最后发布 | 2017年3月 |
SwiftSwift 版本 | 3.0 |
SPM支持 SPM | ✗ |
由 Takuya Otani 维护。
要运行示例项目,请先克隆仓库,然后从 Example 目录中运行 pod install
。
SBLApplication 可以通过 CocoaPods 获得。要安装它,只需将以下行添加到您的 Podfile 中
pod "SBLApplication"
您还需要引入以下代码的 main.swift
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
)
然后从您的 AppDelegate
中移除 @UIApplicationMain
。
要启用触摸指示器,您可能需要将 UIApplication
的实例强制转换为 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 ...
}
SBLApplication 由 Takuya Otani / SimpleBoxes 开发。
版权 © 2017 Takuya Otani
版权 © 2017 SerendipityNZ Ltd.
SBLApplication 可在 MIT 许可下使用。有关更多信息,请参阅 LICENSE 文件。