Tuesday, May 7, 2013

NSCache evictsObjectsWithDiscardedContent example ios


Returns whether or not the cache will automatically evict discardable-content objects whose content has been discarded.
- (BOOL)evictsObjectsWithDiscardedContent
Return Value of [NSCache evictsObjectsWithDiscardedContent]
YES if the cache will evict the object after it is discarded; otherwise, NO.
By default, evictsObjectsWithDiscardedContent is set to YES.
Example of [NSCache evictsObjectsWithDiscardedContent]
   _cellCache = [[NSCache alloc] init];
   [_cellCache setDelegate:self];
   [_cellCache setEvictsObjectsWithDiscardedContent:NO];