Skip to content

Instantly share code, notes, and snippets.

@AviTsadok
Created June 29, 2019 19:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AviTsadok/b43da43f9087e207498054787aee42e2 to your computer and use it in GitHub Desktop.
Save AviTsadok/b43da43f9087e207498054787aee42e2 to your computer and use it in GitHub Desktop.
Skin Handler Example
class Skin {
var titleFont : UIFont!
var titleColor : UIColor!
var subTitleFont : UIFont!
var subTitleColor : UIColor!
var openPopupDuration : TimeInterval!
var backgroundColor : UIColor!
}
class SkinHandler {
let static shared = SkinHandler()
var normalSkin : Skin
var happySkin : Skin
init() {
super.init()
// create here your skins
}
func currentSkin()->Skin {
return normalSkin
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment