GithubHelp home page GithubHelp logo

ramotion / expanding-collection Goto Github PK

View Code? Open in Web Editor NEW
5.6K 150.0 536.0 31.21 MB

:octocat: ExpandingCollection is an animated material design UI card peek/pop controller. iOS library made by @Ramotion

Home Page: https://www.ramotion.com/smartphone-app-development-ui-library-to-peek-and-pop-cards/

License: MIT License

Swift 98.19% Ruby 0.87% Objective-C 0.94%
swift component library material-design ui animation

expanding-collection's People

Contributors

0ber avatar albinekcom avatar aleksei1000000 avatar alexmik89 avatar av0c0der avatar basthomas avatar calvinsug avatar dershowitz011 avatar eckoedc avatar igork-ramotion avatar ikolpachkov avatar imaccallum avatar juriv avatar nikolaevigor avatar ramotiondev avatar ramotionrussell avatar ronnielsen 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

expanding-collection's Issues

cocoapods import

As written in the README, the import statement must read import ExpandingCollection. I found, however, that that statement does not work and rather I have to use import expanding_collection.

add round to the calculation of the currentIndex in ExpandingViewController

Thx for this cool library. I'm trying to add to my project.

Right now I have an issue with the currentIndex. When I peek at the card, the collectionView.contentOffset.x is 221.5, but when I go to the ExpandingTableViewController and then return, the collectionView.contentOffset.x changes to 221.0. This leads to currentIndex pointing at the previous card.

I guess it could be easily fixed by rounding the result.

Can't build the demo code

When I build the demo application, I get the error

/expanding-collection/Source/Helpers/Constraints Helpers/ConstraintsHelper.swift:77:30: Type of expression is ambiguous without more context

func addScaleToFillConstratinsOnView(view: UIView) {
    [NSLayoutAttribute.Left, .Right, .Top, .Bottom].forEach { attribute in
      (self, view) >>>- { $0.attribute = attribute }
    }
  }

Need Swift 3 Support

I updated my project to Swift 3 and now this pod doesn't work. Can you please update it ASAP?? If so, when would that be published?

Catering for Multiple Screen Sizes

Hi there

First off thanks for a great component.

I need to cater for multiple screen sizes so I have to set the itemSize based on the device type. This works well. However, the change does not filter down to the shadow and as a result. I get an oversized shadow. I've been through the demo and the code and there doesn't seem to be a way to redraw/cater for the shadow.

Please help

Imran

Demo Project: Title Label disappearing effect

sep-15-2017 17-50-34
How do I achieve the effect of the title label fading out like in your demo project? I've been searching in the code for days but can't find anything that specifically called that animation.

Need help understands View Archiving

Hey there,

Thank you very much for the great work and your contribution.
I am having a hard time understanding the logic behind archive and unarchive in TransitionDriver. It seems the we are unarchiving right after archiving. Is there any specific reason for this.

exception

fatal error: unexpectedly found nil while unwrapping an Optional value

Problem with carthage!!

When I use this framework from carthage, I am unable to inherit from BasePageCollectionCell. But when I copy the source file directly to my project, everything work fine. When I inherit from BasePageCollectionCell using carthage, I'm just unable to assign the class to the cell.xib. Please fix. Thanks.

Readme typo

In the Readme, I found a couple typos:

  • "Licence" => "License"
  • "Epanding" => "Expanding"

Best,
-Rex

Dynamic content ?

Hi there,

is there any sample code using this collection view with dynamic loaded content like from a JSON Rest Api or similar?

thanks in advance

Error at numberOfItemsInSection

Hi There,

Thanks for this module. It was very useful.

In my current application, I created a customView class which will be called from the viewController. I have my delegate and data source methods set in the customView class. When I try to run the application, though I have assigned numberOfItemInSection, the app crashes at this point of line which is being added as an Image along with this issue. Please kindly acknowledge at the earliest

Thank you.
screen shot 2017-06-15 at 11 02 46 am

must register a nib or a class for the identifier...

must register a nib or a class for the identifier or connect a prototype cell in a storyboard

Following the instructions and stuck on Create CollectionViewController step #2-3.

I have my custom Collection View Cell with .xib files all linked up (frontContainerView, backContainerView, frontConstraintY, backConstraintY)
Gave the collection view a reusable identifier.

Now I don't understand the next part. From what I am getting is that I don't need to drag in a collection view into the storyboard, but somehow just with the ViewController class this will work.

So I have my ViewController inherited from BasePageCollectionCell. My storyboard has nothing but that ViewController.

I am trying to get this to work. Help would be appreciated, thanks.

Infinite Scroll/Pagination?

How would you be able to add infinite scroll/pagination functionality to collection view to load more content? Has anyone been able to achieve this? Thanks in advance

Content jumps in NavigationBar and StatusBar is visible

When I have a StatusBar and NavigationBar visible the card jumps on user interactions. Also when I return from the TableViewController the vertical offset is not quite correct.

Is it possible to use this component with StatusBar and NavigationBar visible?

Incorrect initial location of first Cell

Hi there.

The first cell is left justified on the main screen on initial load. As soon as I touch the Collection View, the cell moves to the correct position(Center).

Any ideas on how to fix this?

Thanks

Imran

Assigning an array's count to collection view.

I'm declaring a global var items:[UIImage] = [] and I've a

func loadimages(url: String!) -> [UIImage]{

        let unsafe = url

        var data1 = [UIImage]()



        let bingo = NSURL(string: unsafe!)
        Alamofire.request(.GET, bingo!)
        .validate()
            .responseJSON{ response in
                switch response.result{
                case .Success:

                    let json33 = JSON(data: response.data!)

                    let allImageStrings = json33["response"]["docs"].flatMap { $0.1["imageData"].first?.1}


                    for Bro in allImageStrings{

                        let url = NSURL(string: Bro.string!)
                        let data = NSData(contentsOfURL: url!)!
                        let image = UIImage(data: data)


                        data1.append(image!)

                    }

                  self.items = data1



                    //print(self.items.count)

                case .Failure(let error):
                    print(error)
                }


    }


    return data1

    }

But when I run this,

override func collectionView(collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {

    print(self.items.count)
    return items.count

    }

Returns 0. How do I make it return the items.count properly? :(

Typo in image

The image describing the two containers contains a typo as it sais contaner instead of container

Custom button on back container view becomes disabled after animation

Great library! I love this thing. But I noticed something very strange, and didn't quite figure out what's going on. I have a button on the back view, but looks like it's disabled when shown after the first animation. Any idea what might cause this? And how it could be fixed?

didSelectItemAt not working

I have followed guidance of this library, and have faced second problem.
The first one is for connecting frontViewContainer, backViewContainer, frontConstraintY, backConstraintY, and I had no solution for that #34 #26 .
But I was able to figure it out with copy/pasting the demo cell from demo project.

Now the second problem is, I have defined didSelectItemAt method, but it's not calling all the time.

func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
        guard let cell = collectionView.cellForItem(at: indexPath) as? MyCollectionViewCell, currentIndex == indexPath.row else { return }

        cell.cellIsOpen(!cell.isOpened)
}

The viewcontroller is inherited from ExpandingViewController, and MyCollectionViewCell is inherited from BasePageCollectionCell.
I'm not sure why does this happening.

Any help would be appreciated.
Thanks

Cell content size is changed to the wrong size + cell selection is broken.

I was having an issue with cell selection. After the collection view was scrolled, the next visible cell's frame was being changed, and tapping on the cell only successfully called the didSelectItem function in a much smaller frame than the full cell.

I noticed that this was happening due to the following code:

extension ExpandingViewController {
  
  public func scrollViewDidEndDecelerating(_ scrollView: UIScrollView) {
    let indexPath = IndexPath(row: currentIndex, section: 0)
    if case let currentCell as BasePageCollectionCell = collectionView?.cellForItem(at: indexPath) {
      currentCell.configurationCell()
    }
  }
}

When I commented this code out, the collection view cells began to behave properly after scrolling. That is to say, the item selection was happening within the proper bounds, and they were not changed.

I am writing this issue to ask if there was any reason to use the currentCell.configurationCell() call, since it seems to be manipulating the frames of the cell's view instead of working with auto layout constraints.

When Close/Pop View back to CollectionView - cell forces open

I'm having an issue whereby when I'm trying to close the pushed view controller, it is animating down to the center (as if the cell is closed) and then upon completion the cell snaps and jolts back to being open again. How can I override it so that the cell is always closed, when you exit the pushed VC?

Looking up and down throughout the code, and whilst it's a beautiful piece of work... it is a nightmare to find out what is calling that last change.

Pass data

Can i pass data between view controllers

Problem with Sliding CollectionView

Hi! Ramotion

I found a bug, when I set ItemWidth > 270 ,some problem will happe, I can't fix it, I need your help! Thanks!!!
untitled23

My English is so bad, I hope you can understand what I mean. Thank you!

UIView Expands Slightly Problem

I just noticed this small movement on the bottom of the UIView, once you see it for the first time it is quite noticeable later. I am using version 0.3.2 of Expanding-Collection, is there any why to fix this on Swift 2.3?
I Have Not Modified The Code In Any Way
It happens right at the end after moving to another collection view

Example Below: (Very Small Movement In The Bottom)
I compressed the two video files showing the problem into a zip file below.
Two Video Examples.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.