Skip to content

Instantly share code, notes, and snippets.

@tobiastom
Forked from ttepasse/lazy.swift
Last active August 29, 2015 14:15
Show Gist options
  • Save tobiastom/a3304b46d21b9487faf1 to your computer and use it in GitHub Desktop.
Save tobiastom/a3304b46d21b9487faf1 to your computer and use it in GitHub Desktop.
@class Foo: NSObject {
@property NSString *lala
@property Bool private
- (void)setPrivate(BOOL)private {
private = private
lala = nil
}
- (NSString *)lala {
if ( lala == nil ) {
lala = @"Lala"
}
return lala
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment