forked from coding/Coding-iOS
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTagsManager.m
More file actions
executable file
·33 lines (29 loc) · 782 Bytes
/
TagsManager.m
File metadata and controls
executable file
·33 lines (29 loc) · 782 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
//
// TagsManager.m
// Coding_iOS
//
// Created by 王 原闯 on 14-10-11.
// Copyright (c) 2014年 Coding. All rights reserved.
//
#import "TagsManager.h"
@implementation TagsManager
- (NSString *)getTags_strWithTags:(NSArray *)tags{
NSString *tags_str;
if (tags && tags.count > 0) {
NSMutableArray *tags_strArray = [[NSMutableArray alloc] init];
for (NSString *tag in tags) {
for (Tag *curTag in _tagArray) {
if ([tag isEqualToString:curTag.id.stringValue]) {
[tags_strArray addObject:curTag.name];
}
}
}
tags_str = [tags_strArray componentsJoinedByString:@","];
}else{
tags_str = @"";
}
return tags_str;
}
@end
@implementation Tag
@end