Coder Social home page Coder Social logo

glimpse's Introduction

Glimpse

Glimpse is a simple library that allows you to create videos from UIViews. It records animations and actions as they happen by taking screen shots of a UIView in a series and then creating a quicktime video and saving it to your app’s document folder.

Setup

To setup Glimpse, add the Glimpse project file to your project or workspace. Import <Glimpse/Glimpse.h> where you want to use it.

Example Usage

Glimpse only uses 2 methods that start and stop recording your view.

#import <Glimpse/Glimpse.h>

@implementation myViewController
- (void)viewDidAppear
{
	    [super viewDidAppear:animated];
    
    	// Create a new Glimpse object.
	    Glimpse *glimpse = [[Glimpse alloc] init];
	    
	    // Start recording and tell Glimpse what to do when you are finished
    	[glimpse startRecordingView:self.view onCompletion:^(NSURL *fileOuputURL) {
        	NSLog(@"DONE WITH OUTPUT: %@", fileOuputURL.absoluteString);
	    }];

		// Create a subview for this example
    	UIView *view = [[UIView alloc] initWithFrame:CGRectInset(self.view.bounds, 40.0f 40.0f)];
	    view.backgroundColor = [UIColor greenColor];
	    view.alpha = 0.0f;
    	
    	[self.view addSubview:view];
    
    	// We are going to record the view fading in.
	    [UIView animateWithDuration:5.0 animations:^{
    	    view.alpha = 1.0f;
	    } completion:^(BOOL finished) {
	    	// Since our animation is complete, lets tell Glimpse to stop recording.
    	    [glimpse stop];
	    }];
 }
@end

Developer info

License

Read LICENSE file for more info.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.