Skip to content

Instantly share code, notes, and snippets.

@jen2
Created May 6, 2017 14:09
Show Gist options
  • Save jen2/b3dd4b210a4a0d096f27845026dc9cc7 to your computer and use it in GitHub Desktop.
Save jen2/b3dd4b210a4a0d096f27845026dc9cc7 to your computer and use it in GitHub Desktop.
Category Files Dinner+CleanUp.h & Dinner+CleanUp.m for "An Introduction to Categories in Objective-C."
// Dinner+CleanUp.h
#import "Dinner.h"
@interface Dinner (CleanUp)
- (void)bringDishesToSink;
- (NSUInteger)countTotalDishes;
- (void)putDishesInDishwasher;
- (void)removeDishesFromDishwasher;
@end
// Dinner+CleanUp.m
#import "Dinner+CleanUp.h"
@implementation Dinner (CleanUp)
- (void)bringDishesToSink
{
//Do something to get dishes to sink.
}
- (NSUInteger)countTotalDishes
{
//Do something to count dishes.
}
- (void)putDishesInDishwasher
{
//Do something to put dishes in dishwasher.
}
- (void)removeDishesFromDishwasher
{
//Do something to put remove dishes from dishwasher.
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment