ThemePicker.swift 485 B

12345678910111213141516171819202122232425
  1. //
  2. // ThemePicker.swift
  3. // SwiftTheme
  4. //
  5. // Created by Gesen on 16/1/25.
  6. // Copyright © 2016年 Gesen. All rights reserved.
  7. //
  8. import Foundation
  9. @objc public class ThemePicker: NSObject, NSCopying {
  10. public typealias ValueType = () -> Any?
  11. public var value: ValueType
  12. required public init(v: @escaping ValueType) {
  13. value = v
  14. }
  15. public func copy(with zone: NSZone?) -> Any {
  16. return type(of: self).init(v: value)
  17. }
  18. }