VerticalCardSwiper | A marriage between the Shazam Discover UI and Tinder | iOS library

 by   JoniVR Swift Version: 2.3.1 License: MIT

kandi X-RAY | VerticalCardSwiper Summary

kandi X-RAY | VerticalCardSwiper Summary

VerticalCardSwiper is a Swift library typically used in Mobile, iOS, Uikit applications. VerticalCardSwiper has no bugs, it has no vulnerabilities, it has a Permissive License and it has medium support. You can download it from GitHub.

A marriage between the Shazam Discover UI and Tinder, built with UICollectionView in Swift.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              VerticalCardSwiper has a medium active ecosystem.
              It has 1211 star(s) with 94 fork(s). There are 21 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 13 open issues and 58 have been closed. On average issues are closed in 33 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of VerticalCardSwiper is 2.3.1

            kandi-Quality Quality

              VerticalCardSwiper has no bugs reported.

            kandi-Security Security

              VerticalCardSwiper has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              VerticalCardSwiper is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              VerticalCardSwiper releases are available to install and integrate.
              Installation instructions are not available. Examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of VerticalCardSwiper
            Get all kandi verified functions for this library.

            VerticalCardSwiper Key Features

            No Key Features are available at this moment for VerticalCardSwiper.

            VerticalCardSwiper Examples and Code Snippets

            No Code Snippets are available at this moment for VerticalCardSwiper.

            Community Discussions

            QUESTION

            UICollectionView scrollToItem() scrolling to previous cell not working correctly
            Asked 2019-Jan-08 at 10:33

            I've been breaking my head over this for the past few weeks and I'm out of ideas..

            Short background

            I built my own UICollectionView framework with a custom UICollectionViewFlowLayout for vertical card paging and creating a card stack effect.

            Here's a gif of what it looks like:

            Problem

            I'm trying to implement a feature that allows the user to scroll to a specific card at a specific index (using the scrollToItem function for example).

            Now the problem is that for some reason, when trying to scroll back to the previous card it doesn't work correctly.

            Below is a recording of what happens, I've attached a tapGestureRecognizer to it, when I tap the focussed (currently centered) card, it should scroll to that index - 1 (so the previous card).
            For some reason it only does this once the frame.origin.y of the bottom card is above the frame.origin.maxY of the focussed (currently centered card).

            Notice that I'm tapping twice on the card to make it work, because the frame.origin.y value of the bottom card needs to be lower than the frame.origin.maxY of the top card for some reason for it to work.

            Basic answers I've already tried so far ...

            ANSWER

            Answered 2019-Jan-08 at 10:33

            I've managed to get it to work another way, by using setContentOffset and calculating the offset manually.

            Source https://stackoverflow.com/questions/54045707

            QUESTION

            UICollectionview custom layout: some indexes have more visible cells than others?
            Asked 2018-Oct-18 at 05:48

            I'm facing a weird issue that I can't seem to figure out or find anything about online.

            So I'm trying to replicate the Shazam discover UI with a UICollectionView and a custom UICollectionViewFlowlayout.

            So far everything is working pretty well, but when adding the "card stack" effect I (or rather the person who was implementing it) noticed there seems to be a weird issue where on some occasions (or rather, when specific indexes are visible, in the example it's row 5, 9) there will be 4 visible cells instead of 3. My guess would be that this has something to do with cell reuse, but I'm not sure why it's doing this. I looked into the individual cell dimensions and they all seem to be the same so it's not that cells are just sized differently.

            Does anyone have an idea as to why this could be happening? Any help or suggestions are really appreciated.

            I'll add a code snippet of the custom flowlayout and screenshots below. You can download the full project here, or alternatively, check out the PR on Github.

            Here's a visual comparison:

            Source code of the custom flowlayout:

            ...

            ANSWER

            Answered 2018-Oct-10 at 20:01

            You have a layout that inherits from flow layout. You overrode layoutAttributesForElements(in rect:) where you take all the elements from super.layoutAttributesForElements and then for each one modify the properties in the method updateCellAttributes.

            This is generally a good way to make a subclass of a flow layout. The UICollectionViewFlowLayout is doing most of the hard work - figuring out where each element should be, which elements are in the rect, what their basically attributes are, how they should be padded, etc, and you can just modify a few properties after the "hard" work is done. This works fine when you are adding a rotation or opacity or some other feature that does not change the location of the item.

            You get into trouble when you change the items frame with updateCellAttributes. Then you can have a situation when you have a cell that would not have appeared in the frame at all for the regular flow layout, but now SHOULD appear because of your modification. So the attribute is not being returned AT ALL by super.layoutAttributesForElements(in rect: CGRect) so they don't show up at all. You can also have the opposite problem that cells that should not be in the frame at all are in the view but transformed in a way that cannot be seen by the user.

            You haven't explained enough of what effect you are trying to do and why you think inheriting from UIFlowLayout is correct for me to be able to specifically help you. But I hope that I have given you enough information that you can find the problem on your own.

            Source https://stackoverflow.com/questions/52739405

            QUESTION

            Scrolling UICollectionViewCell to background instead of vertical
            Asked 2018-Jul-05 at 18:52

            I'm trying to recreate the Shazam Discover UI by subclassing UICollectionView/UICollectionViewFlowLayout.

            I've got as far as paging the cells and making them the right size, however, I'm having trouble getting the cells to scroll to the background, as in, I don't have a clue on how to get it done, I've searched everywhere but can't seem to find it.

            An example of what I'm trying to achieve:

            Any help/tips on how I could do this would be greatly appreciated.

            edit: I ended up building my own solution: https://github.com/JoniVR/VerticalCardSwiper

            ...

            ANSWER

            Answered 2017-Aug-08 at 07:18

            You could use third party libraries to achieve the same. You may use StickyCollectionView. This is an Objective C based library. I believe this one with some customization will help you to approve this.

            Source https://stackoverflow.com/questions/45393660

            QUESTION

            Converting Swift project into an easy-to-use framework for Cocoapods
            Asked 2018-Jul-03 at 13:42

            So I need a bit of help since I can't really figure it out and have spent a lot of time on it already without any results. Most of the things I find on the internet are on how to convert a swift project into a framework, but my issue isn't the project itself or cocoapods, it's about how and what I should make accessible to developers.

            So I built a Swift framework which you can find here, it's built with a UICollectionView with a custom flowlayout and side swiping functionality.

            The problem is that I don't know how I can make this easy to use for developers, I'd like to make it behave like a UICollectionView where you'd need to implement a custom delegate and datasource without having to use the default UICollectionViewDelegate and UICollectionViewDatasource, so I can filter out things that would cause unexpected behaviour or just keep things simple.

            So what would be a good approach here? I'm thinking about possibly subclassing the UICollectionView so people don't have to use a UICollectionView (because that might get confusing) but a VerticalCardSwiperView instead which has the same behaviour, but a bit more limited. I just don't know if that's the correct approach here.

            Any tips, insights or good examples would be deeply appreciated!

            edit 1: I updated the project so it already has the framework structure, I just need to figure out how I'm going to give access to the custom parts to developers.

            edit 2: I have gotten one answer but I think the question might be easily misunderstood. The goal is to make it act and behave like a UICollectionView (with delegates, datasource, ...) but more limited, and I'm wondering how I can accomplish that, if it's even possible.

            edit 3: Alright, I have most of it working, I'll leave a link to the Github online here so people who need something similar can check it out for themselves. Essentially, what I've done is made a custom VerticalCardSwiperDelegate and VerticalCardSwiperDatasource like this:

            ...

            ANSWER

            Answered 2018-May-17 at 11:18

            It looks great!

            I'd say that if you want to expose UICollectionView then follow the UITableView and it's approach with the UIScrollView subclassed delegates.

            Source https://stackoverflow.com/questions/50331148

            QUESTION

            UICollectionViewCell position wrong after animating
            Asked 2018-Jan-23 at 12:01

            So I'm trying to build an open source library combo between Shazam Discover and Tinder based on a UICollectionView with a custom UICollectionViewFlowLayout.

            I'm having an issue where, after animating a cell the the side (e.g. swiping it away to the side), the cell will stay in that position when it is being reused by the UICollectionView. (I'm guessing that cell reuse is the issue here since it only seems to happen after scrolling a couple of cells)

            Is there any simple way to fix this behavior? Or am I doing something else wrong here? Been looking at it for a couple of days but can't seem to find a fix myself.

            You can try/check out the code on Github

            I tried posting some code snippets but I'm not sure which ones I should post here since it's a lot of code. If I should post code on here, let me know.

            Any help is much appreciated. Have a nice day :)

            Here's a demo of what's happening:

            ...

            ANSWER

            Answered 2018-Jan-23 at 12:01

            Outside of the cell class, in HomeVC, where you handle panning to swipe the card away you manipulate also the layer's anchorPoint - you need to reset that to make drawing work as before:

            Source https://stackoverflow.com/questions/48400506

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install VerticalCardSwiper

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/JoniVR/VerticalCardSwiper.git

          • CLI

            gh repo clone JoniVR/VerticalCardSwiper

          • sshUrl

            git@github.com:JoniVR/VerticalCardSwiper.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular iOS Libraries

            swift

            by apple

            ionic-framework

            by ionic-team

            awesome-ios

            by vsouza

            fastlane

            by fastlane

            glide

            by bumptech

            Try Top Libraries by JoniVR

            SmartWallpaper

            by JoniVRSwift

            JavaVersionSwitcher

            by JoniVRShell

            IntelliDock

            by JoniVRShell

            LanguageProcessor

            by JoniVRJavaScript

            dotfiles

            by JoniVRShell