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
float radius = 300; | |
CAShapeLayer *donut = [CAShapeLayer layer]; | |
donut.bounds = CGRectMake(0,0,radius, radius); | |
donut.cornerRadius = radius/2; | |
donut.borderWidth = 2; | |
donut.borderColor = [UIColor redColor].CGColor; | |
[self.layer addSublayer:donut]; | |
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
-(void)perform{ | |
UIViewController *splashScreen = self.sourceViewController; | |
UIViewController *mainScreen = self.destinationViewController; | |
[splashScreen.view addSubview:mainScreen.view]; | |
mainScreen.view.center = CGPointMake(mainScreen.view.center.x, mainScreen.view.center.y-600); | |
[UIView animateWithDuration:1 |
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
-(void)unzipEmbeddedPack{ | |
NSString *embeddedPackPath = [NSString stringWithFormat:@"%@/packName.zip", [[NSBundle mainBundle] resourcePath]]; | |
ZipArchive *za = [[ZipArchive alloc] init]; | |
[za UnzipOpenFile:embeddedPackPath Password:@"abf26a4849e5d97882fcdce5757ae6028281192a"]; | |
//make sure to unzip to tune packs on disk | |
NSError *deleteError = nil; | |
[[NSFileManager defaultManager] removeItemAtPath:embeddedPackPath error:&deleteError]; | |
if(deleteError != nil) NSLog(@"error deleting: %@", deleteError); |
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
// | |
// Recorder.h | |
// | |
// Created by Ariel Elkin on 14/05/2012. | |
// | |
#import <Foundation/Foundation.h> | |
#import <AVFoundation/AVFoundation.h> | |
@interface NarrationManager : NSObject |
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
//You probably won't be able to use "self" in OF, | |
//so I'll let you figure out how to obtain the device's | |
//the width and height from OF | |
float screenWidth = self.view.frame.size.width; | |
float screenHeight = self.view.frame.size.height; | |
UIView *translucentShit = [[UIView alloc] initWithFrame:CGRectMake(0, 0, screenWidth, screenHeight)]; | |
[translucentShit setBackgroundColor:[UIColor blackColor]]; |
NewerOlder