I hereby claim:
- I am benbarahona on github.
- I am benbarahona (https://keybase.io/benbarahona) on keybase.
- I have a public key ASA5x_m-n-fKEqz-SOBgSshil5gTU9W02R_BVhksD5Nubgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
- (void) wiggleEffect | |
{ | |
CGFloat angle = 5.0 * M_PI / 180; | |
CGAffineTransform leftWiggle = CGAffineTransformRotate(CGAffineTransformIdentity, -angle); | |
CGAffineTransform rightWiggle = CGAffineTransformRotate(CGAffineTransformIdentity, angle); | |
self.image.transform = leftWiggle; | |
[UIView beginAnimations:@"wiggle" context:(__bridge void *)(self.image)]; |
- (UIImage*)imageWithImage:(UIImage*)image | |
scaledToSize:(CGSize)newSize | |
cropImage:(BOOL)crop { | |
// Create a graphics image context | |
CGFloat wFactor = newSize.width / image.size.width; | |
CGFloat hFactor = newSize.height / image.size.height; | |
CGFloat maxFactor = MAX(wFactor, hFactor); | |
if (crop) { | |
UIGraphicsBeginImageContext(newSize); |
// | |
// FGScrollLayer.h | |
// Fall G | |
// | |
// Created by Dai Xuefeng on 23/9/12. | |
// Copyright 2012 Nofootbird. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> | |
#import "cocos2d.h" |
- (NSString *)constructHashTagForAppCopy:(NSString *)appCopy | |
{ | |
NSRange hashRange = [appCopy rangeOfString:@"#hashtag#" options:NSCaseInsensitiveSearch]; | |
if(hashRange.location != NSNotFound) | |
{ | |
NSString *hashCopy = [self.channel objectForKey:@"hashtag"]; | |
if(!hashCopy) | |
{ | |
hashCopy = @""; | |
} |
- (void)applicationDidBecomeActive:(UIApplication *)application | |
{ | |
/* | |
Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. | |
*/ | |
// FBSample logic | |
// We need to properly handle activation of the application with regards to SSO | |
// (e.g., returning from iOS 6.0 authorization dialog or from fast app switching). | |
[FBSession.activeSession handleDidBecomeActive]; | |
} |
//BOUNCE ANIMATION | |
-(void)beginBounceAnimation { | |
self.view.transform = CGAffineTransformScale(CGAffineTransformIdentity, 0.001, 0.001); | |
self.view.alpha = 1.0; | |
[UIView beginAnimations:nil context:nil]; | |
[UIView setAnimationDuration:0.25]; | |
[UIView setAnimationDelegate:self]; | |
[UIView setAnimationDidStopSelector:@selector(bounce1AnimationStopped)]; | |
self.view.transform = CGAffineTransformScale(CGAffineTransformIdentity, 1.1, 1.1); | |
[UIView commitAnimations]; |
- (IBAction)showWithLabelMixed:(id)sender { | |
HUD = [[MBProgressHUD alloc] initWithView:self.navigationController.view]; | |
[self.navigationController.view addSubview:HUD]; | |
HUD.delegate = self; | |
HUD.labelText = @"Connecting"; | |
HUD.minSize = CGSizeMake(135.f, 135.f); | |
[HUD showWhileExecuting:@selector(myMixedTask) onTarget:self withObject:nil animated:YES]; |
- (IBAction)showWithLabelDeterminate:(id)sender { | |
HUD = [[MBProgressHUD alloc] initWithView:self.navigationController.view]; | |
[self.navigationController.view addSubview:HUD]; | |
// Set determinate mode | |
HUD.mode = MBProgressHUDModeDeterminate; | |
HUD.delegate = self; | |
HUD.labelText = @"Loading"; |