From 01150e5309c2c924df02405c66d9b5cfb759eac9 Mon Sep 17 00:00:00 2001 From: Dave Caunt Date: Wed, 4 Sep 2013 12:38:47 +0100 Subject: Fixed For loop example so that jj is not incremented twice in each iteration of the loop --- objective-c.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/objective-c.html.markdown b/objective-c.html.markdown index 9e9f43e7..e8c979d8 100644 --- a/objective-c.html.markdown +++ b/objective-c.html.markdown @@ -160,7 +160,7 @@ int main (int argc, const char * argv[]) int jj; for (jj=0; jj < 4; jj++) { - NSLog(@"%d,", jj++); + NSLog(@"%d,", jj); } // => prints "0," // "1," // "2," -- cgit v1.2.3 From 147cc58761c8199a56605b71db741422330f940f Mon Sep 17 00:00:00 2001 From: Dave Caunt Date: Wed, 4 Sep 2013 12:56:58 +0100 Subject: Fixed typo in Parameter --- objective-c.html.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/objective-c.html.markdown b/objective-c.html.markdown index e8c979d8..98204a9a 100644 --- a/objective-c.html.markdown +++ b/objective-c.html.markdown @@ -241,7 +241,7 @@ int main (int argc, const char * argv[]) + (NSString *)classMethod; // - for instance method -- (NSString *)instanceMethodWithParmeter:(NSString *)string; +- (NSString *)instanceMethodWithParameter:(NSString *)string; - (NSNumber *)methodAParameterAsString:(NSString*)string andAParameterAsNumber:(NSNumber *)number; @end @@ -271,7 +271,7 @@ int main (int argc, const char * argv[]) return [[self alloc] init]; } -- (NSString *)instanceMethodWithParmeter:(NSString *)string +- (NSString *)instanceMethodWithParameter:(NSString *)string { return @"New string"; } -- cgit v1.2.3 From 1e6aff4a7b43b8f528951b0c9cb753ae62c9c649 Mon Sep 17 00:00:00 2001 From: Dave Caunt Date: Wed, 4 Sep 2013 12:58:06 +0100 Subject: Fixed inconsistencies in class implementation and protocol naming --- objective-c.html.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/objective-c.html.markdown b/objective-c.html.markdown index 98204a9a..926a4a0d 100644 --- a/objective-c.html.markdown +++ b/objective-c.html.markdown @@ -223,7 +223,7 @@ int main (int argc, const char * argv[]) // } // -/+ (type) Method declarations; // @end -@interface MyClass : NSObject +@interface MyClass : NSObject { int count; id data; @@ -248,7 +248,7 @@ int main (int argc, const char * argv[]) // Implement the methods in an implementation (MyClass.m) file: -@implementation UserObject +@implementation MyClass // Call when the object is releasing - (void)dealloc -- cgit v1.2.3