This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)setObject:(id)object forKey:(NSString *)key | |
{ | |
dispatch_barrier_async(_dispatch_queue, ^{ | |
_cache[key] = object; | |
}); | |
} | |
- (id)objectForKey:(NSString *)key | |
{ | |
__block id object; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_dispatch_queue = dispatch_queue_create("com.Experiments.Cache", DISPATCH_QUEUE_CONCURRENT); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_dispatch_queue = dispatch_queue_create("com.Experiments.Cache", DISPATCH_QUEUE_SERIAL); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)setObject:(id)object forKey:(NSString *)key | |
{ | |
[_lock lock]; | |
_cache[key] = object; | |
[_lock unlock]; | |
} | |
- (id)objectForKey:(NSString *)key | |
{ | |
id object; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)setObject:(id)object forKey:(NSString *)key | |
{ | |
dispatch_sync(_dispatch_queue, ^{ | |
_cache[key] = object; | |
}); | |
} | |
- (id)objectForKey:(NSString *)key | |
{ | |
__block id object; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)setObject:(id)object forKey:(NSString *)key | |
{ | |
PERF::MutexLocker l(__instanceLock__); | |
_cache[key] = object; | |
} | |
- (id)objectForKey:(NSString *)key | |
{ | |
PERF::MutexLocker l(__instanceLock__); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)setObject:(id)object forKey:(NSString *)key | |
{ | |
@synchronized (_cache) { | |
_cache[key] = object; | |
} | |
} | |
- (id)objectForKey:(NSString *)key | |
{ | |
id object; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath | |
{ | |
CustomTableViewCell *tableViewCell = (CustomTableViewCell *)cell; | |
// Check to see if table is in neutral position. If so, bail for offscreen cells | |
if (_tableView.contentOffset.y == DEFAULT_Y_OFFSET && cell.frame.origin.y > self.view.bounds.size.height) { | |
return; | |
} | |
// Do Content-Loading For Cell |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lipo -create -output | |
<build-location>/<framework-name>.framework/<framework-name> | |
<build-location>/build/Build/Products/Release-iphoneos/<framework-name>.framework/ | |
<framework-name> <build-location>/build/Build/Products/Release-iphonesimulator/<framework-name>.framework/<framework-name> | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xcodebuild -workspace <workspace-name> -scheme <target-name> -configuration 'Release' -derivedDataPath <build-location> |
NewerOlder