Coder Social home page Coder Social logo

demonnico / pinterestswift Goto Github PK

View Code? Open in Web Editor NEW
1.9K 52.0 212.0 1.95 MB

This is a Swift based demo project to show how to make the transition Pinterest liked.

License: MIT License

Swift 99.65% Objective-C 0.35%
swift transition-pinterest pinterest-like

pinterestswift's Introduction

PinterestSwift

Compatible with Xcode 11 / Swift 5.0

This is a Swift based demo project to show how to make the transition Pinterest 2.0+ liked.

Refer from StackOverFlow

TODO

Something looks like below:

And this is my copy:

Creator

Nicholas Tau

License

This is available under the MIT license. See the LICENSE file for more info.

pinterestswift's People

Contributors

calissendorff avatar cruisediary avatar demonnico avatar hassan-rafique avatar rishabhtayal 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pinterestswift's Issues

WaterFallViewCell init fails while using this in a master detail app

I am using this within a master-detail app and calling WaterFallViewController when an item is selected in the master view (table). App is not able to load the WaterfallView and failing at required init(coder aDecoder: NSCoder) calling the fatal error. Debug trace is:

Swift._assertionFailed (Swift.StaticString, Swift.String, Swift.StaticString, Swift.UInt) -> () ()

Any thoughts?

Swift 3

it'd be cool to have a swift 3 version, if you have any interest to create a branch i would like to help with that.

Static Images

Hi
Please make it for images downloading from some source.

滑动到最底部的时候,push 和 pop 后 会出现不完美的显示

这里有个不完美的展示,如下图。
我发现是由于 NTTansition 这句前后转换坐标的时候,出现不一致的情况,pop 前后取出来的值竟然不一致,具体相差 64 pixel 刚好;如果没有滑到最后,或者多半不会出现这种不一致的情况。
很想知道问题在哪里,还希望花点时间来看下,谢谢😄
let leftUpperPoint = gridView!.convertPoint(CGPointZero, toView: toViewController.view)

push 之前
simulator screen shot 2016 7 11 5 39 33

pop 之后
simulator screen shot 2016 7 11 5 39 38

Using Your Code in Appcelerator

Hi there,
I was wondering whether you could provide direction as how to use your transition in Appcelerator. Any guidance would be greatly appreciated.

Swipe from left gesture

As well as the custom shrink effect, Pinterest lets you swipe from left to go back. Is it possible to include this in PinterestSwift? Alternatively, could the custom transition be animated as the user swipes from the left?

swipe

License?

First, thanks for building this library!

Second, I'm a bit confused about the licensing. The README states that it's MIT licensed, but the code states that it's "All Rights Reserved."

Would it be possible to get the inline code comments updated to reflect the README?

I'd be happy to send a Pull Request that makes the change--if you're OK with the change.

Thanks!
🎩

NTHorizontalPageViewController cellForItemAt always entered with indexPath: (0, 0)

Hello, I started having this problem after updating to XCode 12.0.1 and ios14. Before the update everything worked fine with ios 13.

I will explain how I set up the project because I'm not an expert at XCode and I might be doing something wrong:

  1. I cloned this repo, then dragged all of the classes into an existing project I was working on.

  2. From the cloned project's storyboard, I copy pasted your navigation controller and the NTWaterfallViewController into my own project's storyboard as shown below. (I also tried building it from from scratch on the storyboard but got the same result). I set the classes to NTNavigationController and NTWaterfallViewController

image

Now when I run the project I see the Waterfall Collection View as expected. But no matter what image I click on, I ALWAYS get the image cell at indexpath (0,0)

image

image

The cellForItemAt() function inside NTHorizontalPageViewController is always entered with indexpath: (0,0). I also checked the setToIndexPath() method but it's entered with the correct indexpath(0,3).

When I recreate this on the cloned project it works fine(even on ios 14). But when I try to incorporate it into a new project by following the 2 steps I mentioned above, I get this bug. So maybe I'm doing something wrong during installation? Please point me in the right direction. Thank you!

Edit: I tried with iPhone 8(ios 14) and it worked. The problem is specific to iPhone X and iPhone 11.

The problem probably has to do with:
pageView.scrollToItem(at: indexPath as IndexPath, at:.centeredHorizontally, animated: false)
inside NTTransition. The scroll statement just doesn't work anymore with ios14 and xcode12

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.