1
2
3
4
5
6
7
8
9
10
|
#import "MenuItem.h"
@implementation MenuItem
- (instancetype)initWithText:(OFString *)text action:(OFString *)action
{
self = [super init];
_text = [text copy];
_action = [action copy];
|
>
>
>
>
>
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#import "MenuItem.h"
@implementation MenuItem
+ (instancetype)itemWithText:(OFString *)text action:(OFString *)action
{
return [[self alloc] initWithText:text action:action];
}
- (instancetype)initWithText:(OFString *)text action:(OFString *)action
{
self = [super init];
_text = [text copy];
_action = [action copy];
|