AppSwitcherView 0.1.2

AppSwitcherView 0.1.2

Oleksii Mykhailenko 维护。



  • 作者
  • Oleksii Mykhailenko

AppSwitcherView

Version License Platform

App Switcher 中显示 LaunchScreen 或您的 UIView/UIViewController 而不是应用程序截屏。

要求

  • iOS 10.0+
  • Xcode 10.0+
  • Swift 4.2+

安装

AppSwitcherView 通过 CocoaPods 提供。要安装它,只需将以下行添加到您的 Podfile 中

pod 'AppSwitcherView'

如何使用

通过在应用程序代理中调用以下代码行打开 AppSwitcherView:- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions。不要忘了导入: import AppSwitcherView

import AppSwitcherView
...
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
...
AppSwitcherView.setup()
...
return true
}

就是这样,运行您的应用程序,当在 App Switcher 中打开时,您将看到 LaunchScreen。

如何打开 App Switcher

在 iPhone X 或更高版本上切换应用

  • 从屏幕底部向中间轻扫并按住,直到看到应用程序切换器。

如果你的iPad已与智能键盘蓝牙键盘配对,请按Command-Tab键在应用程序之间切换。

iPhone 8及更早版本通过主屏幕按钮切换应用程序

  • 双击主屏幕按钮显示最近使用的应用程序。

示例

显示启动屏幕

AppSwitcherView.setup()

显示自定义UIView

AppSwitcherView.setupWith(view: YOUR_UIVIEW)

显示自定义UIViewController

AppSwitcherView.setupWith(viewController: YOUR_UIVIEWCONTROLLER)

显示带有模糊效果的快照

AppSwitcherView.setupWithBlur() //Default blur settings
AppSwitcherView.setupWithBlur(style: .dark, alpha: 0.75) //Custom blur settings

作者

Oleksii Mykhailenko, [email protected]

许可

AppSwitcherView可在MIT许可证下使用。有关更多信息,请参阅LICENSE文件。