Last active
December 16, 2015 04:49
-
-
Save colemancda/5379818 to your computer and use it in GitHub Desktop.
Exception for Init - Use when you created a new default inititalizer and dont want anyone to use the '-init' method
This file contains hidden or 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
- (id)init | |
{ | |
[NSException raise:@"Wrong initialization method" | |
format:@"You cannot use %@ with %@, you have to use %@", | |
NSStringFromSelector(_cmd), | |
self, | |
NSStringFromSelector(@selector(<#New Initializer#>))]; | |
return nil; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment