This file contains 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
+ (instancetype)uiDateFormatter | |
{ | |
static NSDateFormatter* uiDateFormatter = nil; | |
static dispatch_once_t onceToken; | |
dispatch_once(&onceToken, ^{ | |
uiDateFormatter = [[NSDateFormatter alloc] init]; | |
uiDateFormatter.dateStyle = NSDateFormatterFullStyle; | |
uiDateFormatter.timeStyle = NSDateFormatterNoStyle; | |
}); | |
return uiDateFormatter; |
This file contains 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
@implementation IrisSegue | |
- (void)perform | |
{ | |
[self.sourceViewController presentViewController:self.destinationViewController animated:NO completion:^{ | |
// don't ask - it just works with two calls to dispatch_async | |
dispatch_async(dispatch_get_main_queue(), ^{ | |
dispatch_async(dispatch_get_main_queue(), ^{ | |
NSString* shutterAnimationName = @"cameraIris"; | |
This file contains 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
@implementation NSNumber (Subscripting) | |
// call it like this: [@0:1]; | |
- (NSIndexSet*):(NSUInteger)length | |
{ | |
return [NSIndexSet indexSetWithIndexesInRange:NSMakeRange([self unsignedIntegerValue], length)]; | |
} | |
@end |
This file contains 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
command alias reveal_load expr (void*)dlopen([(NSString*)[(NSBundle*)[NSBundle mainBundle] pathForResource:@"libReveal" ofType:@"dylib"] cStringUsingEncoding:0x4], 0x2); | |
command alias reveal_start expr (void)[(NSNotificationCenter*)[NSNotificationCenter defaultCenter] postNotificationName:@"IBARevealRequestStart" object:nil]; | |
command alias reveal_stop expr (void)[(NSNotificationCenter*)[NSNotificationCenter defaultCenter] postNotificationName:@"IBARevealRequestStop" object:nil]; |
This file contains 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
#!/bin/sh | |
APPBUNDLEPATH="${TARGET_BUILD_DIR}/${EXECUTABLE_NAME}.app/" | |
REVEALFRAMEWORKPATH="/Applications/Reveal.app/Contents/SharedSupport/iOS-Libraries/libReveal.dylib" | |
if [ -f "${REVEALFRAMEWORKPATH}" ] && [ "${CONFIGURATION}" != "ReleaseAppStore" ]; then | |
cp "${REVEALFRAMEWORKPATH}" "${APPBUNDLEPATH}" | |
fi |
This file contains 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
Date: | |
Short: 1/9/07 | |
Medium: Jan 9, 2007 | |
Long: January 9, 2007 | |
Full: Tuesday, January 9, 2007 | |
Time: | |
Short: 9:42 AM | |
Medium: 9:42:00 AM | |
Long: 9:42:00 AM GMT+1 |
This file contains 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
// Copyright 2014 bitecode, Michael Ochs | |
// | |
// See http://www.ios-coding.com/blog/2014/06/22/model-handling-in-uiviewcontroller/ | |
// | |
// Licensed under the Apache License, Version 2.0 (the "License"); | |
// you may not use this file except in compliance with the License. | |
// You may obtain a copy of the License at | |
// | |
// http://www.apache.org/licenses/LICENSE-2.0 | |
// |
This file contains 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
http://gsp1.apple.com/pep/gcc - Returns the current country code - Probably based on the IP address? |
This file contains 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
#!/bin/sh | |
diff "Podfile.lock" "Pods/Manifest.lock" > /dev/null | |
if [[ $? != 0 ]] ; then | |
echo 'CocoaPods needs some more clean up...' | |
echo 'Quit iOS simulator...' | |
osascript -e 'tell app "iPhone Simulator" to quit' | |
echo 'Quit Xcode...' | |
osascript -e 'tell app "Xcode" to quit' | |
pod install |
OlderNewer