Skip to content

Instantly share code, notes, and snippets.

@CanTheAlmighty
Created September 7, 2016 14:33
Show Gist options
  • Save CanTheAlmighty/916fe02cd346cc0f3d8cd3001b2306c0 to your computer and use it in GitHub Desktop.
Save CanTheAlmighty/916fe02cd346cc0f3d8cd3001b2306c0 to your computer and use it in GitHub Desktop.
Snippet for xcode, frequently used init with coder/frame combo, plus a prepareSubviews() method to do common initialization
required init?(coder decoder: NSCoder)
{
super.init(coder: decoder)
prepareSubviews()
}
override init(frame: CGRect)
{
super.init(frame: frame)
prepareSubviews()
}
func prepareSubviews()
{
<#View Initialization Code#>
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment