You need to use this line of code to resolve your problem:
__block Person *aPerson = nil;
For more details, please refer to this tutorial: Blocks and Variables
More Related Contents:
- How do I avoid capturing self in blocks when implementing an API?
- What does the “__block” keyword mean?
- Retain cycle on `self` with blocks
- Compiler error: “initializer element is not a compile-time constant”
- Custom completion block for my own method [duplicate]
- When to use enumerateObjectsUsingBlock vs. for
- Implementing a method taking a block to use as callback
- What does this caret ^ syntax, with void on either side mean? [duplicate]
- Caret character between types rather than variables, surrounded by parentheses
- Block Declaration Syntax List
- What does the “Couldn’t compile connection:” error mean?
- Why can’t we use a dispatch_sync on the current queue?
- Alternatives to dispatch_get_current_queue() for completion blocks in iOS 6?
- Compiler error “expected method not found” when using subscript on NSArray
- How to dispatch on main queue synchronously without a deadlock?
- How to simplify callback logic with a Block?
- Checking Objective-C block type?
- Using __block and __weak
- How does a Block capture the variables outside of its enclosing scope?
- Why do nil / NULL blocks cause bus errors when run?
- What is the difference between a __weak and a __block reference?
- How to Check if an NSDate occurs between two other NSDates
- How does @synchronized lock/unlock in Objective-C?
- Objective-C: Forward Class Declaration
- Objective-C – CABasicAnimation applying changes after animation?
- Store data in MKAnnotation?
- How to perform Callbacks in Objective-C
- iOS Background downloads when the app is not active
- ARC – The meaning of __unsafe_unretained?
- RestKit: How does one post an array of objects?