mirror of
https://github.com/nickshanks/ResKnife.git
synced 2024-08-31 04:29:17 +00:00
21 lines
501 B
Objective-C
21 lines
501 B
Objective-C
#import "Element.h"
|
|
|
|
@implementation Element
|
|
|
|
- (id)initWithType:(NSString *)typeValue andLabel:(NSString *)labelValue
|
|
{
|
|
// sets values directly for speed reasons (less messaging overhead)
|
|
self = [super init];
|
|
label = [labelValue copy];
|
|
type = [typeValue copy];
|
|
return self;
|
|
}
|
|
|
|
+ (id)elementOfType:(NSString *)typeValue withLabel:(NSString *)labelValue
|
|
{
|
|
Element *element = [[Element allocWithZone:[self zone]] initWithType:typeValue andLabel:labelValue];
|
|
return [element autorelease];
|
|
}
|
|
|
|
@end
|