Coder Social home page Coder Social logo

flipbook's People

Contributors

frosty avatar stonesam92 avatar tp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flipbook's Issues

Recommend the use of ImageOptim

screen shot 2014-12-13 at 13 34 25

Not sure if Xcode's image conversion on sending to the app makes this useless, but I tend to run this on any generated png.

Rotating an image

I expect a lot of people will be interested in this, so I'm putting up my example code. This uses core image to rotate the image inside an imageview and records the rotation into a animation.

This is because I couldn't get a transform to work on my snapshots how I would normally do it:

        let number = CGFloat(-1.01 * M_PI)
        let rotationTransform = CATransform3DMakeRotation(number, 0, 0, 1)
        let rotationAnimation = CABasicAnimation(keyPath: "transform")

        rotationAnimation.toValue = NSValue(CATransform3D: rotationTransform);
        rotationAnimation.duration = 0.4
        rotationAnimation.cumulative = true
        rotationAnimation.repeatCount = 10000;

        let image = UIImage(named: "Spinner-0");
        let imageView = UIImageView(image: image);
        imageView.layer.addAnimation(rotationAnimation, forKey:"transform")

        let outer = UIView(frame: imageView.bounds)
        outer.addSubview(imageView)

        view.addSubview(outer)
        arcFlipbook = Flipbook()

        arcFlipbook.renderTargetView(outer, imagePrefix: "Progress-Spinner", frameCount: 20) { (view, frame) in
            return
        }

Zip of my working example using CIImage: http://cl.ly/3H20450t1T0F/Flipbook-orta.zip

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.