Skip to content

Instantly share code, notes, and snippets.

@pratikshabhisikar
Created August 16, 2011 13:43
Show Gist options
  • Save pratikshabhisikar/1149097 to your computer and use it in GitHub Desktop.
Save pratikshabhisikar/1149097 to your computer and use it in GitHub Desktop.
Dog.m
#import "Dog.h"
@implementation Dog
@synthesize delegate;
-(void) bark {
if(self.delegate != nil && [self.delegate respondsToSelector:@selector(dogWillStartBarking:)]) {
[self.delegate dogWillStartBarking:self];
}
NSLog(@"Bhaw Bhaw");
if(self.delegate != nil && [self.delegate respondsToSelector:@selector(dogDidFinishBarking:)]) {
[self.delegate dogDidFinishBarking:self];
}
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment