Created
September 7, 2016 14:33
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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