Created
April 17, 2013 16:52
-
-
Save rnystrom/5405925 to your computer and use it in GitHub Desktop.
Ensuring a property is only set once
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
- (void)setOriginalContainerRect:(CGRect)originalContainerRect { | |
static dispatch_once_t onceToken; | |
dispatch_once(&onceToken, ^{ | |
_originalContainerRect = originalContainerRect; | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment