O2ThemeManager+OC.swift 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. //
  2. // ThemeManager+OC.swift
  3. // SwiftTheme
  4. //
  5. // Created by Gesen on 16/9/18.
  6. // Copyright © 2016年 Gesen. All rights reserved.
  7. //
  8. import Foundation
  9. @objc extension O2ThemeManager {
  10. /**
  11. extension for Objective-C, Use setTheme(plistName: String, path: ThemePath) in Swift
  12. */
  13. public class func setThemeWithPlistInMainBundle(_ plistName: String) {
  14. setTheme(plistName: plistName, path: .mainBundle)
  15. }
  16. /**
  17. extension for Objective-C, Use setTheme(plistName: String, path: ThemePath) in Swift
  18. */
  19. public class func setThemeWithPlistInSandbox(_ plistName: String, path: URL) {
  20. setTheme(plistName: plistName, path: .sandbox(path))
  21. }
  22. /**
  23. extension for Objective-C, Use setTheme(dict: NSDictionary, path: ThemePath) in Swift
  24. */
  25. public class func setThemeWithDictInMainBundle(_ dict: NSDictionary) {
  26. setTheme(dict: dict, path: .mainBundle)
  27. }
  28. /**
  29. extension for Objective-C, Use setTheme(dict: NSDictionary, path: ThemePath) in Swift
  30. */
  31. public class func setThemeWithDictInSandbox(_ dict: NSDictionary, path: URL) {
  32. setTheme(dict: dict, path: .sandbox(path))
  33. }
  34. }