From 985d23a52b76593a120adff5381c2df3a80fe298 Mon Sep 17 00:00:00 2001 From: HairyFotr Date: Wed, 23 Aug 2017 10:14:39 +0200 Subject: Fix a bunch of typos --- 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 2b599378..04c4e529 100644 --- a/objective-c.html.markdown +++ b/objective-c.html.markdown @@ -786,7 +786,7 @@ MyClass *newVar = [classVar retain]; // If classVar is released, object is still // Automatic Reference Counting (ARC) // Because memory management can be a pain, Xcode 4.2 and iOS 4 introduced Automatic Reference Counting (ARC). // ARC is a compiler feature that inserts retain, release, and autorelease automatically for you, so when using ARC, -// you must not use retain, relase, or autorelease +// you must not use retain, release, or autorelease MyClass *arcMyClass = [[MyClass alloc] init]; // ... code using arcMyClass // Without ARC, you will need to call: [arcMyClass release] after you're done using arcMyClass. But with ARC, -- cgit v1.2.3 From 2e7ecbae8a5f5484aa9c32efacb8e2847d8e2bac Mon Sep 17 00:00:00 2001 From: Christopher Dusovic Date: Sun, 25 Mar 2018 17:46:45 -0700 Subject: Add missing block referred to in comment --- objective-c.html.markdown | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'objective-c.html.markdown') diff --git a/objective-c.html.markdown b/objective-c.html.markdown index 04c4e529..de3884af 100644 --- a/objective-c.html.markdown +++ b/objective-c.html.markdown @@ -731,7 +731,10 @@ if ([myClass conformsToProtocol:@protocol(CarUtilities)]) { /////////////////////////////////////// // Blocks are statements of code, just like a function, that are able to be used as data. // Below is a simple block with an integer argument that returns the argument plus 4. -int (^addUp)(int n); // Declare a variable to store the block. +^(int n) { + return n + 4; +} +int (^addUp)(int n); // Declare a variable to store a block. void (^noParameterBlockVar)(void); // Example variable declaration of block with no arguments. // Blocks have access to variables in the same scope. But the variables are readonly and the // value passed to the block is the value of the variable when the block is created. -- cgit v1.2.3