| Inherits from | |
|---|---|
| Declared in | NNTags.h |
contains all NNTag instances in the application. don't rely on tag order! posts NNTagsHaveChanged notification whenever the tags array has changed or a single tag was renamed, clicked or used.
- (NNTag *)tagForName:(NSString *)tagName Name of the tag to return
Tag with name or nil
Call this to get a tag for a String - do not simply create new tags!
NNTags.h- (NNTag *)tagForName:(NSString *)tagName creationOptions:(NNTagsCreationOptions)options Name of the tag
Creation options
Tag with name or new NNSimpleTag for tagName
Call this to get a tag for a String - control tag creation by using the NNTagCreationOptions: NNTagsCreationOptionNone will return nil if no tag exists for tagName NNTagsCreationOptionsFull will create a new NNSimpleTag if no tag exists NNTagsCreationOptionTemp will create a new NNTempTag if no tag exists (which will not be added to the db)
NNTags.h- (NSArray *)tagsForNames:(NSArray *)tagNames Array of strings
Tags for tagNames
Get all tags corresponding to the names - if they exist
NNTags.h- (NSArray *)tagsForNames:(NSArray *)tagNames creationOptions:(NNTagsCreationOptions)options NSArray of NSStrings with tag names
Creation options
Array with tags for tagNames
Get all tags corresponding to the keywords in the tagNames array are returned. Creation options can be used like in tagForName:options:
NNTags.h- (NSMutableArray *)tagsAll currently known tags as an Array
NNTags.h- (void)removeTag:(NNTag *)aTag Tag to remove
Removes a tag.
NNTags.h- (NSEnumerator *)objectEnumeratorNSEnumerator for NNTags
NNTags.h- (NSInteger)countNumber of NNTags
NNTags.h- (NNTag *)tagAtIndex:(NSUInteger)idx NNTag at index idx
NNTags.h- (void)sortUsingDescriptors:(NSArray *)sortDescriptors Sorts the tags accordings to the descriptors. Use this if you want to have a temporarily sorted tag array - this is not very long lived ;)
NNTags.h- (NNTag *)currentBestTagNNTag with the best overal rating
NNTags.h- (void)validateKeyword:(NSString *)keyword keyword to validate
Will throw an exception for an invalid keyword. A keyword is invalid if it does not have @ as a prefix or consists only of the @
NNTags.h- (CGFloat)tagClickCountWeightWeight of the tag's click count
NNTags.h- (void)setTagClickCountWeight:(CGFloat)weight Weight the click count of a tag should have in respect to the use count. Values are in range 0 (use count only) to 1 (click count only)
NNTags.h- (void)syncFromDBCall this to sync NNTags to tags in sqlite DB
NNTags.h- (void)setTags:(NSMutableArray *)otherTags this is private and should not be used unless you really know what you are doing! at the moment it is only used on app startup and when the app needs to sync to the tag db
NNTags.mLast updated: 2010-5-13