I hereby claim:
- I am larsacus on github.
- I am larsacus (https://keybase.io/larsacus) on keybase.
- I have a public key whose fingerprint is 4F0E 87B0 42E0 8CDE 01DE C310 AB95 DD3F 493A C413
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
Pod::Spec.new do |s| | |
s.name = 'CSPlaceKitten' | |
s.version = '0.0.1' | |
s.summary = 'Automatically place adorable kittens as place holder images on your image views.' | |
s.description = 'A place kitten category on top of the awesome UIImageView+AFNetworking category that will automatically place adorable kittens as place holder images on your image views.' | |
s.homepage = 'https://github.com/cnstoll/CSPlaceKitten' | |
s.license = {:type => 'MIT'} | |
s.author = {'Conrad Stoll' => 'cnstoll@me.com'} | |
s.requires_arc = true | |
s.platform = :ios, '5.0' |
HWWand *wand = [[HWWand alloc] init]; | |
HWMagic *magic = [HWSpell genericSpell]; | |
[wand setMagic:(__bridge HWSpell *)magic]; |
-(void)pauseLayer:(CALayer*)layer | |
{ | |
CFTimeInterval pausedTime = [layer convertTime:CACurrentMediaTime() fromLayer:nil]; | |
layer.speed = 0.0; | |
layer.timeOffset = pausedTime; | |
} | |
-(void)resumeLayer:(CALayer*)layer | |
{ | |
CFTimeInterval pausedTime = [layer timeOffset]; |
// Clips the bottom left corner to a radius | |
CGSize cornerSize = CGSizeMake(10,10); | |
UIBezierPath *roundRectMaskPath = [UIBezierPath bezierPathWithRoundedRect:view.bounds | |
byRoundingCorners:UIRectCornerBottomLeft | |
cornerRadii:cornerSize]; | |
CAShapeLayer *roundRectMaskLayer = [CAShapeLayer layer]; | |
roundRectMaskLayer.frame = self.view.bounds; | |
roundRectMaskLayer.path = roundRectMaskPath.CGPath; |
UIGraphicsBeginImageContextWithOptions(size,YES,0.0); | |
[image drawInRect:CGRectMake(0, 0, size.width, size.height)]; | |
UIImage *deserializedImage = UIGraphicsGetImageFromCurrentImageContext()]; | |
UIGraphicsEndImageContext(); |
NSString *pdfPath = [[NSBundle mainBundle] pathForResource:@"pdf_name" ofType:@"pdf"];//this is assuming the pdf is in the main bundle | |
NSInteger pageNumber = 1;//for a one-page PDF | |
CGSize containerSize = self.imageView.bounds.size; | |
UIGraphicsBeginImageContext(containerSize); | |
CGContextRef context = UIGraphicsGetCurrentContext(); | |
const char *pdfFileName = [pdfPath cStringUsingEncoding:NSASCIIStringEncoding]; | |
CGDataProviderRef pdfDataProvider = CGDataProviderCreateWithFilename(pdfFileName); | |
CGPDFDocumentRef myDocument = CGPDFDocumentCreateWithProvider(pdfDataProvider); |
#include "mach/mach_time.h" //NOT #import | |
mach_timebase_info_data_t mach_info; | |
mach_timebase_info(&mach_info); | |
uint64_t start = mach_absolute_time(); | |
//do stuff to time | |
uint64_t finish = mach_absolute_time() - start; |
- (id)initWithTitle:(NSString *)title | |
delegate:(id)delegate | |
animationImages:(UIImage *)firstImage, ...NS_REQUIRES_NIL_TERMINATION; |
- (void)viewWillAppear:(BOOL)animated{ | |
[[LARSAdController sharedManager] addAdContainerToView:[self view] withViewController:self]; | |
[[LARSAdController sharedManager] setGoogleAdPublisherId:myPublisherId]; //change publisher id unless you want me to have your monies | |
[[LARSAdController sharedManager] layoutBannerViewsForCurrentOrientation:self.interfaceOrientation]; | |
} | |
-(void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration{ | |
[[LARSAdController sharedManager] layoutBannerViewsForCurrentOrientation:toInterfaceOrientation]; | |
} |