November 2013
Beginner
592 pages
17h 49m
English
Starting with the .h file, follow these steps:
1. Delete the import of ViewCarProtocol.h.
2. Change the delegate to UIViewController *delegate.
3. Add these block properties:
@property (copy, nonatomic) CDCar* (^carToView)(void); @property (copy, nonatomic) void (^carViewDone)(BOOL dataChanged); @property (copy, nonatomic) void (^nextOrPreviousCar)(BOOL isNext);
One thing to notice is that each block property is marked as copy, not strong. This is very important and is related to how blocks work with external variables. Again, for more information, see Chapter 17 of Learning Objective-C by Robert Clair.
Each of the properties declares a block that replaces the same protocol ...
Read now
Unlock full access