summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLevi Bostian <levi.bostian@gmail.com>2013-12-23 02:19:18 -0600
committerLevi Bostian <levi.bostian@gmail.com>2013-12-31 14:59:48 -0600
commitce770c61df6670f3ac20241dae6314dea5a9c846 (patch)
treed09715deb43e8905821b204f9e564fc79931fb4f
parent8bd91cb6e263e914ec4397f11e753bc4080c55ab (diff)
Add simple NSSet example.
-rw-r--r--objective-c.html.markdown4
1 files changed, 4 insertions, 0 deletions
diff --git a/objective-c.html.markdown b/objective-c.html.markdown
index 419c0475..98019404 100644
--- a/objective-c.html.markdown
+++ b/objective-c.html.markdown
@@ -146,6 +146,10 @@ int main (int argc, const char * argv[])
[mutableSet addObject:@"Hello"];
NSLog(@"%@", mutableSet); // prints => {(Hello)}
+ // Set object
+ NSSet *set = [NSSet setWithObjects:@"Hello", @"Hello", @"World", nil];
+ NSLog(@"%@", set); // prints => {(Hello, World)}
+
///////////////////////////////////////
// Operators
///////////////////////////////////////