Skip to content

Instantly share code, notes, and snippets.

View jdg's full-sized avatar

Jonathan George jdg

View GitHub Profile
- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request
navigationType:(UIWebViewNavigationType)navigationType {
NSLog(@"webView requested: %@ - %@", request, [[request URL] host]);
NSURL *requestUrl = [request URL];
if ([[requestUrl host] isEqualToString:OAUTH_REDIRECT_TRIGGER]) {
[self completeAccessTokenRequest];
}
return YES;
}
# define ALog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);
# ifdef DEBUG
# define DLog(fmt, ...) ALog(fmt, ##__VA_ARGS__);
# else
# define DLog(...)
# endif
/*
* Memory.c
* Outpost
*
* Created by Jim Dovey on 23/04/09.
* Copyright 2009 Morfunk, LLC. All rights reserved.
*
* Copyright (c) 2009, Jim Dovey
* All rights reserved.
*
ProjectsAppDelegate *appDelegate = (ProjectsAppDelegate *)[[UIApplication sharedApplication] delegate];
UIViewAnimationTransition trans = UIViewAnimationTransitionFlipFromLeft;
[UIView beginAnimations: nil context: nil];
[UIView setAnimationTransition: trans forView: [appDelegate window] cache: YES];
[UIView setAnimationDuration:1.0];
[self.navigationController pushViewController:self.projectViewController animated:NO];
[UIView commitAnimations];