mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-08-04 13:57:38 +02:00
Add to exceptions section. Add NSError reference.
This commit is contained in:
@@ -718,7 +718,6 @@ int main (int argc, const char * argv[]) {
|
|||||||
@interface Car : NSObject <CarUtilities> // Name of protocol goes inside <>
|
@interface Car : NSObject <CarUtilities> // Name of protocol goes inside <>
|
||||||
// You don't need the @property or method names here for CarUtilities. Only @implementation does.
|
// You don't need the @property or method names here for CarUtilities. Only @implementation does.
|
||||||
- (void)turnOnEngineWithUtilities:(id <CarUtilities>)car; // You can use protocols as data too.
|
- (void)turnOnEngineWithUtilities:(id <CarUtilities>)car; // You can use protocols as data too.
|
||||||
<<<<<<< HEAD
|
|
||||||
@end
|
@end
|
||||||
// The @implementation needs to implement the @properties and methods for the protocol.
|
// The @implementation needs to implement the @properties and methods for the protocol.
|
||||||
@implementation Car : NSObject <CarUtilities>
|
@implementation Car : NSObject <CarUtilities>
|
||||||
@@ -760,7 +759,6 @@ if ([myClass conformsToProtocol:@protocol(CarUtilities)]) {
|
|||||||
|
|
||||||
- (void)beNiceToBrother:(id <Brother>)brother;
|
- (void)beNiceToBrother:(id <Brother>)brother;
|
||||||
|
|
||||||
=======
|
|
||||||
@end
|
@end
|
||||||
// The @implementation needs to implement the @properties and methods for the protocol.
|
// The @implementation needs to implement the @properties and methods for the protocol.
|
||||||
@implementation Car : NSObject <CarUtilities>
|
@implementation Car : NSObject <CarUtilities>
|
||||||
@@ -802,7 +800,6 @@ if ([myClass conformsToProtocol:@protocol(CarUtilities)]) {
|
|||||||
|
|
||||||
- (void)beNiceToBrother:(id <Brother>)brother;
|
- (void)beNiceToBrother:(id <Brother>)brother;
|
||||||
|
|
||||||
>>>>>>> 8c6f583... Add much more to the protocols section.
|
|
||||||
@end
|
@end
|
||||||
// See the problem is that Sister relies on Brother, and Brother relies on Sister.
|
// See the problem is that Sister relies on Brother, and Brother relies on Sister.
|
||||||
#import "Sister.h"
|
#import "Sister.h"
|
||||||
|
Reference in New Issue
Block a user