AppDelegate.swift 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. //
  2. // AppDelegate.swift
  3. // BFRecordScreenKit
  4. //
  5. // Created by harry on 11/23/2021.
  6. // Copyright (c) 2021 harry. All rights reserved.
  7. //
  8. import BFCommonKit
  9. import BFMaterialKit
  10. import UIKit
  11. @UIApplicationMain
  12. class AppDelegate: UIResponder, UIApplicationDelegate {
  13. var window: UIWindow?
  14. func application(_: UIApplication, didFinishLaunchingWithOptions _: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
  15. // Override point for customization after application launch.
  16. BFConfig.shared.styleColor = .nomal
  17. BFConfig.shared.statusBarStyle = .light
  18. BFConfig.shared.styleBackGroundColor = UIColor.black
  19. BFConfig.shared.styleTitleColor = UIColor.white
  20. BFConfig.shared.cutViewStyleColor = UIColor.white
  21. BFConfig.shared.cutViewTintColor = UIColor.black
  22. BFConfig.shared.pointEditNamalBackgroundColor = UIColor.hexColor(hexadecimal: "#1A1A1A")
  23. BFMaterialConfig.shared.materialDeleteImage = UIImage.moduleImage(named: "icon_search_delete", moduleName: "BFMaterialKit") ?? UIImage()
  24. BFConfig.shared.cutDurationColor = UIColor(red: 238.0 / 255.0, green: 0 / 255.0, blue: 81.0 / 255.0, alpha: 0.1)
  25. BFConfig.shared.hiddenMusicMask = false
  26. BFConfig.shared.otherTintColor = UIColor.hexColor(hexadecimal: "#333333")
  27. BFConfig.shared.statusBarStyle = .light
  28. BFMaterialConfig.shared.choseType = .single
  29. if let tbc = window?.rootViewController as? UITabBarController {
  30. tbc.selectedIndex = 1
  31. tbc.tabBar.barTintColor = .black
  32. tbc.tabBar.backgroundColor = .black
  33. tbc.tabBar.tintColor = .black
  34. for item in tbc.tabBar.items! {
  35. item.setTitleTextAttributes([.foregroundColor: UIColor.white], for: .selected)
  36. }
  37. }
  38. return true
  39. }
  40. func applicationWillResignActive(_: UIApplication) {
  41. // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
  42. // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
  43. }
  44. func applicationDidEnterBackground(_: UIApplication) {
  45. // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
  46. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
  47. }
  48. func applicationWillEnterForeground(_: UIApplication) {
  49. // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
  50. }
  51. func applicationDidBecomeActive(_: UIApplication) {
  52. // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
  53. }
  54. func applicationWillTerminate(_: UIApplication) {
  55. // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
  56. }
  57. }