Created
January 3, 2013 19:42
-
-
Save anthonycvella/4446417 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ItemDatabase.h | |
// WarZ Companion | |
// | |
// Created by Anthony on 1/3/13. | |
// Copyright (c) 2013 Anthony. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> | |
@interface ItemDatabase : NSObject { | |
NSString *category; | |
NSString *name; | |
} | |
@property (nonatomic, copy) NSString *category; | |
@property (nonatomic, copy) NSString *name; | |
+ (id)itemOfCategory:(NSString*)category name:(NSString*)name; | |
@end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ItemDatabase.m | |
// WarZ Companion | |
// | |
// Created by Anthony on 1/3/13. | |
// Copyright (c) 2013 Anthony. All rights reserved. | |
// | |
#import "ItemDatabase.h" | |
@implementation ItemDatabase | |
@synthesize category, name; | |
+ (id)itemOfCategory:(NSString *)category name:(NSString *)name | |
{ | |
ItemDatabase *newItem = [[self alloc] init]; | |
[newItem setCategory:category]; | |
[newItem setName:name]; | |
return newItem; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment