Custom UINavigationController back buttons under iOS7

When you first create / get a reference to the navigation controller, set a global custom back image (replaces the chevron) with: [self.navigationController.navigationBar setBackIndicatorImage: [UIImage imageNamed:@”CustomerBackImage”]]; [self.navigationController.navigationBar setBackIndicatorTransitionMaskImage: [UIImage imageNamed:@”CustomerBackImage”]]; The title of the back button is owned by the view that it points to, not the current view. You can make it blank by […]

NSURL category to return the full path, with trailing slash and query parameters

@implementation NSURL (PathHelper) -(NSString*)fullPathWithQuery; { // getting a path without the trailing slash stripped is annoying. NSString *pathWithPrevervedTrailingSlash = [CFBridgingRelease(CFURLCopyPath((CFURLRef)self)) stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; if (self.query) { return [NSString stringWithFormat:@”%@?%@”, pathWithPrevervedTrailingSlash, self.query]; } else { return pathWithPrevervedTrailingSlash; } } @end Might even work…

renewing ACAccount credentials on iOS

An iOS 5/6 device can have system-level Twitter/Facebook accounts that become disassociated from the underlying service accounts. This means that the ACAccountStore framework will return you ACAccount objects that can be used to sign requests and get access tokens, but NONE OF THE REQUESTS WILL WORK and you’ll get MYSTERIOUS OAUTH ERRORS and LOTS OF […]