This file contains hidden or 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
@interface UIImage(WebP) | |
- (id)initWithWebPData:(NSData *)data; | |
@end |
This file contains hidden or 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
convert -coalesce googlechrome.gif target.png |
This file contains hidden or 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
CGFloat borderWidth = 3.f; | |
CGFloat circleRadius = self.bounds.size.width / 2 - borderWidth; | |
CGPoint circleCenter = CGPointMake(CGRectGetMidX(rect), CGRectGetMidY(rect)); | |
CGContextRef context = UIGraphicsGetCurrentContext(); | |
CGContextSetStrokeColorWithColor(context, [[UIColor colorWithRed:255.0/255.0 green:210.0/255.0 blue:60.0/255.0 alpha:1] CGColor]); | |
UIBezierPath *firstHalf = [UIBezierPath bezierPath]; |
This file contains hidden or 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
CABasicAnimation *positionAnimation; | |
positionAnimation = [CABasicAnimation animationWithKeyPath:@"position"]; | |
positionAnimation.fromValue = [NSValue valueWithCGPoint:fromPosition]; | |
positionAnimation.toValue = [NSValue valueWithCGPoint:toPosition]; | |
CABasicAnimation *alphaAnimation; | |
alphaAnimation = [CABasicAnimation animationWithKeyPath:@"opacity"]; | |
alphaAnimation.fromValue = [NSNumber numberWithFloat:fromAlpha]; | |
alphaAnimation.toValue = [NSNumber numberWithFloat:toAlpha]; | |
This file contains hidden or 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
// | |
// KSDIdlingWindow.h | |
// | |
// Created by Brian King on 4/13/10. | |
// Copyright 2010 King Software Designs. All rights reserved. | |
// | |
// Based off: | |
// http://stackoverflow.com/questions/273450/iphone-detecting-user-inactivity-idle-time-since-last-screen-touch | |
// |
NewerOlder