Script:
cd ${SRCROOT}
if [ -e "Pods" ]
then
pod install
else
touch Pods
[UIView beginAnimations:@"FlipAnimation" context:nil]; | |
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:myFirstDrillDownView cache:NO]; | |
[UIView setAnimationBeginsFromCurrentState:YES]; | |
[myFirstDrillDownView exchangeSubviewAtIndex:0 withSubviewAtIndex:1]; | |
[UIView commitAnimations]; |
-(CGRect) fullBoundingBox | |
{ | |
NSMutableArray *stack = [[NSMutableArray new] autorelease]; | |
for (CCNode *childNode in self.children) | |
{ | |
[stack addObject:childNode]; | |
} | |
float leftmost, highest, rightmost, lowest; | |
while ([stack count] > 0) | |
{ |
@implementation UIView (NibLoadingExtension) | |
+ (id)viewFromNib | |
{ | |
static NSMutableDictionary *caches = nil; | |
static dispatch_once_t onceToken; | |
dispatch_once(&onceToken, ^{ | |
caches = [[NSMutableDictionary dictionary] retain]; | |
}); |
// | |
// NLCachedImageTableViewCell.h | |
// niners | |
// | |
// Created by Lyman, Nathan(nlyman) on 1/9/12. | |
// Copyright (c) 2012 __MyCompanyName__. All rights reserved. | |
// | |
#import <UIKit/UIKit.h> |
package com.yelp.android.ui.widgets; | |
import com.yelp.android.R; | |
import android.content.Context; | |
import android.content.res.TypedArray; | |
import android.graphics.Canvas; | |
import android.graphics.Paint; | |
import android.graphics.PorterDuff; | |
import android.graphics.PorterDuffXfermode; |
Promised speed: | |
0.1s https://dl.dropboxusercontent.com/s/bpgountdjrbs17n/2014-06-09%20at%2019.00.png | |
Actual speed: | |
575s https://dl.dropboxusercontent.com/s/2kbn5p1g4t03fvl/2014-06-09%20at%2019.00%20%281%29.png | |
With optimizations: |
// Accessorizer's default generated singleton code for class Foo | |
static Foo *sharedInstance = nil; | |
+ (void) initialize | |
{ | |
if (sharedInstance == nil) | |
sharedInstance = [[self alloc] init]; | |
} |
// Feel free to use. MIT License | |
#import <Foundation/Foundation.h> | |
#import "cocos2d.h" | |
// Layer that will just capture any touch events on it | |
@interface OpaqueLayer : CCLayerColor { | |
} |
@interface UIImage (fixOrientation) | |
- (UIImage *)fixOrientation; | |
@end |