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
{ | |
// Details: https://github.com/victorporof/Sublime-HTMLPrettify#using-your-own-jsbeautifyrc-options | |
// Documentation: https://github.com/einars/js-beautify/ | |
"html": { | |
"brace_style": "collapse", // "expand", "end-expand", "expand-strict" | |
"indent_char": " ", | |
"indent_scripts": "keep", // "separate", "normal" | |
"indent_size": 2, | |
"max_preserve_newlines": 10, | |
"preserve_newlines": true, |
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
/// based on http://stackoverflow.com/questions/347721/how-do-i-apply-a-perspective-transform-to-a-uiview | |
[UIView animateWithDuration:0.3f delay:0.0f options:UIViewAnimationOptionBeginFromCurrentState|UIViewAnimationOptionCurveEaseIn animations:^{ | |
CATransform3D rotationAndPerspectiveTransform = CATransform3DIdentity; | |
rotationAndPerspectiveTransform.m34 = 1.0 / -500; | |
rotationAndPerspectiveTransform = CATransform3DRotate(rotationAndPerspectiveTransform, M_PI_2, 0.0f, 1.0f, 0.0f); | |
[self.view.layer setTransform:rotationAndPerspectiveTransform]; | |
} completion:^(BOOL finished) { | |
// REFRESH YOUR VIEW HERE |
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
// Modified version of an Apple Docs example that accomodates for the extra milliseconds used in NodeJS/JS dates | |
// https://developer.apple.com/library/ios/#documentation/Cocoa/Conceptual/DataFormatting/Articles/dfDateFormatting10_4.html#//apple_ref/doc/uid/TP40002369-SW1 | |
- (NSDate *)dateForRFC3339DateTimeString:(NSString *)rfc3339DateTimeString { | |
NSDateFormatter *rfc3339DateFormatter = [[NSDateFormatter alloc] init]; | |
[rfc3339DateFormatter setDateFormat:@"yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'SSS'Z'"]; | |
[rfc3339DateFormatter setTimeZone:[NSTimeZone timeZoneForSecondsFromGMT:0]]; | |
// Convert the RFC 3339 date time string to an NSDate. |
NewerOlder