GithubHelp home page GithubHelp logo

christianroman / crmotionview Goto Github PK

View Code? Open in Web Editor NEW
760.0 760.0 76.0 8.97 MB

A custom photo viewer that implements device motion scrolling, inspired by Facebook Paper.

License: MIT License

Ruby 2.33% Objective-C 97.67%

crmotionview's People

Contributors

942v avatar christianroman avatar gscalzo avatar riosc avatar tulushev 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

crmotionview's Issues

GIFs

Would be great if gifs were supported

Improve fluidity

how can we improve the fluidity to be more like Facebook's paper ?

API Docs for Swift

I am trying to do this:

var motionView: CRMotionView = CRMotionView(frame: self.view.bounds)
motionView.setImage(image)
motionView.setMotionEnabled(true)

but it says 'CRMotionView' does not have a member named 'setImage'. What is the correct way to use this in Swift?

Other image size

If image height is not 1136px:

  • (void)setImage:(UIImage *)image
    {
    _image = image;
    int w = _viewFrame.size.height / _image.size.height * _image.size.width;
    [_imageView setFrame:CGRectMake(0, 0, w, _viewFrame.size.height)];

...
}

CALayerInvalidGeometry crash

I just add this API to my swift project :

motionView = CRMotionView(frame: view.frame, image: UIImage(named: "\(animalName) BG”))
view.addSubview(motionView)

My app will crash due to this error :

Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [nan 368]’

how should I fix this ?
Thank you

StoryBoard

this project will have support for StoryBoards? any example or something thanks :)

Using Xcode 6, Image showing on simulator but failed to show on a real iPhone

I am using Xcode 6 beta, the background ImageView was successfully showing on the simulator, but when I build my project with my own iPhone, imageView is not shown.

However, if I use Xcode 5 everything is good.

I also tried the DEMO project, I got the same problem. Does anyone knows the reason of it??
Many thanks!

UIScrollView's scroll bar indicator align

If we make [motionView setImage:theimage]; with an already image set we have a problem with the scroll indicator. For this moment my only on solution is to imageview alloc in the setImage. like that :

// edit Resolved.

Full screen mode

I'm trying to use it in full screen mode but when my app is launched before any interaction the CRMotionview is not covering the status bar :
untitled

Once I click on the scrollView or I move my phone it goes full screen normally

There is not available gyro

I am always getting "There is not available gyro." but everything seems to work. Why am I getting this in the console?

Single-tap image resize

It would be great to see an update, similar to the app which inspired this project, in which the image/view first appears at full size (AspectFit) and then, tapping the image once will cause it to zoom in (AspectFill) and provide the current motion functionality.

Single-Tapping again will make the image go back to full-size (AspectFIt).

This was an update that Paper added recently and it really works great.

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.