Advertisement
Guest User

Untitled

a guest
Feb 20th, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. import Foundation
  2.  
  3. /// The application settings protocol.
  4. public protocol Settings {
  5.  
  6. /// The current application language.
  7. var language: String? { get set }
  8.  
  9. }
  10.  
  11. public extension UserDefaults: Settings {
  12.  
  13. /// The current application language.
  14. var language: String? {
  15. get { return string(forKey: #function) }
  16. set { set(newValue, forKey: #function) }
  17. }
  18.  
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement