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
@interface __PLGBorderTopButton : UIView | |
@property (nonatomic) PLGColor selectedColor; | |
@property (nonatomic) UIButton* button; | |
@end | |
@implementation __PLGBorderTopButton | |
- (id)forwardingTargetForSelector:(SEL)aSelector |
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
NSMutableURLRequest* request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"http://staging.fuerteint.com/projects/polligraf/login.php"]]; | |
[request setHTTPMethod:@"POST"]; | |
[request setHTTPBody:[NSJSONSerialization dataWithJSONObject:@{ @"username" : @"some_username_here", @"pass" : @"some_password_here" } options:0 error:nil]]; | |
NSURLResponse* response; | |
NSError* error; | |
[NSURLConnection sendSynchronousRequest:request | |
returningResponse:&response | |
error:&error]; |
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
UIFont* lableFont = [UIFont boldSystemFontOfSize:17]; | |
CTFontRef font = (__bridge CTFontRef)(lableFont); | |
CFStringRef name = CTFontCopyFullName(font); |
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
[NUDATA updateMaps:^{ | |
[wself setUpMap]; | |
} | |
forEvent:_event | |
withToken:&self_token]; |
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
__unsafe_unretained SKEventMapController* wself = self; | |
if (![self shouldDisplayMap]) | |
{ | |
[NUDATA updateMaps:^{ | |
[wself setUpMap]; | |
} forEvent:_event]; | |
} |
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)_updateResults:(void (^)(void))block caller:(dispatch_queue_t)callerqueue | |
{ | |
__unsafe_unretained NUData* wself = self; | |
dispatch_sync(_serial_results_queue, ^{ | |
NSManagedObjectContext* ctx = updateContext; | |
__block NSArray* results = nil; | |
[ctx performBlockAndWait:^{ |
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)update:(void (^)(void))block | |
{ | |
__unsafe_unretained NUData* wself = self; | |
dispatch_queue_t caller = dispatch_get_current_queue(); | |
dispatch_async(queue, ^{ | |
NSLog(@"updating"); | |
// dispatch these tasks concurrently, wait the queue until done | |
dispatch_queue_t async_tasks_queue = dispatch_queue_create("com.ft.update.async", DISPATCH_QUEUE_CONCURRENT); | |
dispatch_group_t async_tasks_group = dispatch_group_create(); |
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)updateGalleryAndVideos:(void(^)(void))block | |
{ | |
__unsafe_unretained NUData* wself = self; | |
dispatch_queue_t caller = dispatch_get_current_queue(); | |
dispatch_async(queue, ^{ | |
if (_updatingManufacturerResults) return; | |
_updatingManufacturerResults = YES; |
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)_updateEntries:(void (^)(void))block forEvent:(SKEvent *)event caller:(dispatch_queue_t)callerqueue | |
{ | |
void(^block_c)(void) = ^(void) { | |
NSLog(@"completed update entries for %@", event.uid); | |
if (block) block(); | |
}; | |
// Fail early if no event | |
if (!event) | |
{ |
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
if (!responseData || responseError) | |
{ | |
[self _didFailUpdateEntries:block_c forEvent:event caller:callerqueue]; | |
return; | |
} |