如何获得标签名称的tagGuid?

时间:2014-01-27 09:27:55

标签: ios iphone cocoa-touch evernote

EverNote sdk :

想知道是否有方法从tagGuids获取tagName。 例如,标记名称为ShoppingList,其中包含相应的tagGuids

enter image description here

需要填写 TODO:

// TODO: Given the tag name, get the  tagGuid here.

EDAMNoteFilter* filter = [[EDAMNoteFilter alloc] initWithOrder:0 ascending:NO words:nil notebookGuid:nil tagGuids:nil timeZone:nil inactive:NO emphasized:nil];

1 个答案:

答案 0 :(得分:0)

我找到了答案

 [[EvernoteNoteStore noteStore] listTagsWithSuccess:^(NSArray *tags) {
                for(EDAMTag *tag in tags)
                {
                    if([tag.name isEqualToString:@"ShoppingList"])
                    {
                         EDAMNoteFilter* filter = [[EDAMNoteFilter alloc] initWithOrder:0 ascending:NO words:nil notebookGuid:nil tagGuids:[@[tag.guid] mutableCopy] timeZone:nil inactive:NO emphasized:nil];
                    }

                    break;
                }
            } failure:^(NSError *error) {
                NSLog(@"tag error : %@",error);

            }];

如果有更好的方法可以告诉我。