November 2013
Beginner
592 pages
17h 49m
English
You may have expected to see 99 printed in the console because in the pulsing example, you were able to successfully modify self.taxiWidth.constant. This has to do with how the block’s execution stack is created. Figure 13-1 shows that the stack has a read-only (italicized) copy of each variable. The values are frozen at the time the block is created.
Figure 13-1 Block context variables
Although the block’s copy of self is not modifiable, the value is still the address for the same aboutViewController object. The properties can still be changed, as can any part of those properties.
For the 99 example, aNumber is not a ...
Read now
Unlock full access