1
0
mirror of https://github.com/adambard/learnxinyminutes-docs.git synced 2025-08-06 14:56:54 +02:00

Merge pull request #308 from dcaunt/master

Fixed typos and naming inconsistencies.
This commit is contained in:
Adam Bard
2013-09-04 09:06:01 -07:00

View File

@@ -160,7 +160,7 @@ int main (int argc, const char * argv[])
int jj; int jj;
for (jj=0; jj < 4; jj++) for (jj=0; jj < 4; jj++)
{ {
NSLog(@"%d,", jj++); NSLog(@"%d,", jj);
} // => prints "0," } // => prints "0,"
// "1," // "1,"
// "2," // "2,"
@@ -223,7 +223,7 @@ int main (int argc, const char * argv[])
// } // }
// -/+ (type) Method declarations; // -/+ (type) Method declarations;
// @end // @end
@interface MyClass : NSObject <MyCustomProtocol> @interface MyClass : NSObject <MyProtocol>
{ {
int count; int count;
id data; id data;
@@ -241,14 +241,14 @@ int main (int argc, const char * argv[])
+ (NSString *)classMethod; + (NSString *)classMethod;
// - for instance method // - for instance method
- (NSString *)instanceMethodWithParmeter:(NSString *)string; - (NSString *)instanceMethodWithParameter:(NSString *)string;
- (NSNumber *)methodAParameterAsString:(NSString*)string andAParameterAsNumber:(NSNumber *)number; - (NSNumber *)methodAParameterAsString:(NSString*)string andAParameterAsNumber:(NSNumber *)number;
@end @end
// Implement the methods in an implementation (MyClass.m) file: // Implement the methods in an implementation (MyClass.m) file:
@implementation UserObject @implementation MyClass
// Call when the object is releasing // Call when the object is releasing
- (void)dealloc - (void)dealloc
@@ -271,7 +271,7 @@ int main (int argc, const char * argv[])
return [[self alloc] init]; return [[self alloc] init];
} }
- (NSString *)instanceMethodWithParmeter:(NSString *)string - (NSString *)instanceMethodWithParameter:(NSString *)string
{ {
return @"New string"; return @"New string";
} }