From 591eab5e4f8f0a27306588d78964a4879368ca6c Mon Sep 17 00:00:00 2001 From: jesusjjf Date: Tue, 5 Apr 2016 20:02:46 -0700 Subject: grammar + spelling errors --- objective-c.html.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'objective-c.html.markdown') diff --git a/objective-c.html.markdown b/objective-c.html.markdown index 097cb846..0dbb3ae3 100644 --- a/objective-c.html.markdown +++ b/objective-c.html.markdown @@ -110,7 +110,7 @@ int main (int argc, const char * argv[]) NSLog(@"%f", piDouble); NSLog(@"%4.2f", piDouble); // prints => "3.14" - // NSDecimalNumber is a fixed-point class that's more precise then float or double + // NSDecimalNumber is a fixed-point class that's more precise than float or double NSDecimalNumber *oneDecNum = [NSDecimalNumber decimalNumberWithString:@"10.99"]; NSDecimalNumber *twoDecNum = [NSDecimalNumber decimalNumberWithString:@"5.002"]; // NSDecimalNumber isn't able to use standard +, -, *, / operators so it provides its own: @@ -700,7 +700,7 @@ if ([myClass conformsToProtocol:@protocol(CarUtilities)]) { // NOTE: If two or more protocols rely on each other, make sure to forward-declare them: #import "Brother.h" -@protocol Brother; // Forward-declare statement. Without it, compiler would through error. +@protocol Brother; // Forward-declare statement. Without it, compiler will throw error. @protocol Sister -- cgit v1.2.3 From 1311f4dbb29085167248e8a746b27a5e1bee7459 Mon Sep 17 00:00:00 2001 From: ven Date: Sun, 26 Jun 2016 14:41:30 +0200 Subject: manually merge #1838 --- objective-c.html.markdown | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'objective-c.html.markdown') diff --git a/objective-c.html.markdown b/objective-c.html.markdown index 0dbb3ae3..e41e71c3 100644 --- a/objective-c.html.markdown +++ b/objective-c.html.markdown @@ -20,7 +20,7 @@ Multi-line comments look like this */ // XCode supports pragma mark directive that improve jump bar readability -#pragma mark Navigation Functions // New tag on jump bar named 'Navigation Functions' +#pragma mark Navigation Functions // New tag o@"Third number = %@", thirdNumber); // prin jump bar named 'Navigation Functions' #pragma mark - Navigation Functions // Same tag, now with a separator // Imports the Foundation headers with #import @@ -133,6 +133,8 @@ int main (int argc, const char * argv[]) NSArray *anArray = @[@1, @2, @3, @4]; NSNumber *thirdNumber = anArray[2]; NSLog(@"Third number = %@", thirdNumber); // prints => "Third number = 3" + // Since Xcode 7, NSArray objects can be typed (Generics) + NSArray *stringArray = @[@"hello", @"world"]; // NSMutableArray is a mutable version of NSArray, allowing you to change // the items in the array and to extend or shrink the array object. // Convenient, but not as efficient as NSArray. @@ -146,6 +148,8 @@ int main (int argc, const char * argv[]) NSDictionary *aDictionary = @{ @"key1" : @"value1", @"key2" : @"value2" }; NSObject *valueObject = aDictionary[@"A Key"]; NSLog(@"Object = %@", valueObject); // prints => "Object = (null)" + // Since Xcode 7, NSDictionary objects can be typed (Generics) + NSDictionary *numberDictionary = @{@"a": @1, @"b": @2}; // NSMutableDictionary also available as a mutable dictionary object NSMutableDictionary *mutableDictionary = [NSMutableDictionary dictionaryWithCapacity:2]; [mutableDictionary setObject:@"value1" forKey:@"key1"]; @@ -161,6 +165,8 @@ int main (int argc, const char * argv[]) // Set object NSSet *set = [NSSet setWithObjects:@"Hello", @"Hello", @"World", nil]; NSLog(@"%@", set); // prints => {(Hello, World)} (may be in different order) + // Since Xcode 7, NSSet objects can be typed (Generics) + NSSet *stringSet = [NSSet setWithObjects:@"hello", @"world", nil]; // NSMutableSet also available as a mutable set object NSMutableSet *mutableSet = [NSMutableSet setWithCapacity:2]; [mutableSet addObject:@"Hello"]; -- cgit v1.2.3 From 8f99c7ab7ef071979d6143ad0cf53576c1a970e0 Mon Sep 17 00:00:00 2001 From: ven Date: Tue, 12 Jul 2016 19:14:38 +0200 Subject: fix #2308 --- objective-c.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'objective-c.html.markdown') diff --git a/objective-c.html.markdown b/objective-c.html.markdown index e41e71c3..2b599378 100644 --- a/objective-c.html.markdown +++ b/objective-c.html.markdown @@ -20,7 +20,7 @@ Multi-line comments look like this */ // XCode supports pragma mark directive that improve jump bar readability -#pragma mark Navigation Functions // New tag o@"Third number = %@", thirdNumber); // prin jump bar named 'Navigation Functions' +#pragma mark Navigation Functions // New tag on jump bar named 'Navigation Functions' #pragma mark - Navigation Functions // Same tag, now with a separator // Imports the Foundation headers with #import -- cgit v1.2.3