marmelroy / peekpop Goto Github PK
View Code? Open in Web Editor NEWPeek and Pop with backwards-compatibility
License: MIT License
Peek and Pop with backwards-compatibility
License: MIT License
Instead of making a screenshot of a view controller at the begining and presenting a screenshot in the preview, you can present a viewController itself in the preview and make a screenshot of it at the commit. This screenshot is for smooth animation purpose only. The advantage is that if you have a content which is loaded from the server then it is loaded in the preview, just like in the original 3d Touch PeekPop. Below is the effect I was able to get.
I know this cannot be implemented without the 3D touch API but could you add a gesture recognizer for when the peek method is run, and while the user still has is finger on the view and he swipes up, the action menu comes from below. Could you do that? Is that possible?
Awesome framework btw!
Peek shows viewController with UIScreen bounds instead of PeekPopView's bounds. So what I end up with is the clipping of the my actual viewController's view (and not the whole view itself).
Works well on a 6s though.
It would be nice to see a list of apps using this PeekPop library.
Do you have any plan to adapt it for Swift 3?
This is really great project and I wish to use it
In GitHub repository description, "compatability" should be "compatibility".
Im using Kingfisher to download the images, and Im trying to show the a picture on peek mode, but it seams the view controller is going to be shown a screenshot is loaded or something, because the code gets to where it downloads, the callback is called when completed, but the actual Image is not shown
@marmelroy How to use PeekPop swift file in Objective C project ?
I used swift library with bridging header in my objective c project but there seems to a problem with source view registration for 3D Touch.
When i converted this file i found this method under ForceTouchDelegate
Now i do not know how to use this method to register source view for 3D Touch.
There is a retain cycle that avoids to release the memory of the view controller using the PeekPop. The references to view controller and delegates inside the library should be weak.
It works only on first scroll frame, on invisible content not working.
Even after scroll, first frame freezes.
In sample app, if change column to 1 you can see the results.
Currently producing blur screenshots takes about 0.20 second on iphone 5s, and this time is added every time the peekPopPossible method is invoked. Using UIVisualEffectView takes no time to generate, which makes the peekPop gesture much faster.
A plus is that all animations in the background are still visible (and blurred). The downside is that you cannot control blur radius, but this is only a visual downside.
Any plans to move to Swift3?
When controller was popped, the collectionView cell object still retain by PeekPop.
I updated using carthage update PeekPop
and built the preview app. Still it results in a memory leak of +4MB per screenshot. Help??
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.