Skip to content

Instantly share code, notes, and snippets.

@interface __PLGBorderTopButton : UIView
@property (nonatomic) PLGColor selectedColor;
@property (nonatomic) UIButton* button;
@end
@implementation __PLGBorderTopButton
- (id)forwardingTargetForSelector:(SEL)aSelector
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];
UIFont* lableFont = [UIFont boldSystemFontOfSize:17];
CTFontRef font = (__bridge CTFontRef)(lableFont);
CFStringRef name = CTFontCopyFullName(font);
[NUDATA updateMaps:^{
[wself setUpMap];
}
forEvent:_event
withToken:&self_token];
__unsafe_unretained SKEventMapController* wself = self;
if (![self shouldDisplayMap])
{
[NUDATA updateMaps:^{
[wself setUpMap];
} forEvent:_event];
}
- (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:^{
- (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();
- (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;
- (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)
{
if (!responseData || responseError)
{
[self _didFailUpdateEntries:block_c forEvent:event caller:callerqueue];
return;
}