Giter Club home page Giter Club logo

vegascroll's Introduction

ios ios Swift 3.0.x GitHub license Twitter

Made by Applikey Solutions

Find this project on Dribbble

Also check another flowlayout for UICollectionView: https://github.com/ApplikeySolutions/GravitySlider

VegaScrollFlowLayout

Table of Contents

  1. Purpose
  2. Supported OS & SDK Versions
  3. Installation
  4. Usage
  5. Demo
  6. Release Notes
  7. Contact Us
  8. License

Purpose

VegaScroll is a lightweight animation flowlayout for UICollectionView completely written in Swift 4, compatible with iOS 11 and Xcode 9.

Supported OS & SDK Versions

  • Supported build target - iOS 9.0

Installation

Add the following line in your Podfile.

pod 'VegaScrollFlowLayout'

Carthage

If you're using Carthage you can add a dependency on VegaScroll by adding it to your Cartfile:

github "AppliKeySolutions/VegaScroll"

Usage

import VegaScrollFlowLayout

let layout = VegaScrollFlowLayout()
collectionView.collectionViewLayout = layout
layout.minimumLineSpacing = 20
layout.itemSize = CGSize(width: collectionView.frame.width, height: 87)
layout.sectionInset = UIEdgeInsets(top: 10, left: 0, bottom: 10, right: 0)

Demo

example-plain

Release Notes

Version 1.0

  • Release version.

Contact Us

You can always contact us via [email protected] We are open for any inquiries regarding our libraries and controls, new open-source projects and other ways of contributing to the community. If you have used our component in your project we would be extremely happy if you write us your feedback and let us know about it!

License

The MIT License (MIT)

Copyright © 2017 Applikey Solutions

Permission is hereby granted free of charge to any person obtaining a copy of this software and associated documentation files (the "Software") to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

vegascroll's People

Contributors

applikey avatar insidegui avatar jonivr avatar pvclever avatar smitters 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

vegascroll's Issues

layout coming out nil

guard let layout = myCollectionView.collectionViewLayout as? VegaScrollFlowLayout else { return }

keep coming out nil, how can i solve this

Spring animation

Can we have (or is there?) an option to don't have the spring animation of the cells?

Alpha issue for reusable some row

Getting alpha issue while displaying rows from dequeueReusableCell(..)

Rows are displaying with less alpha value(some transparent).

Support for CollectionView with Section Header

Hi ,
I am facing a issue in which first collectionView item disappears while displayed section header in collectionView.
Flow layout gave two different issue,

  1. While Scroll to downward: First Item after each section header disappears.
  2. While Scroll to upward: Section header disappears.
    See Attachment for issue.
    ezgif com-video-to-gif

Minimum build target is iOS 11 with Carthage

Hi, in the README, it says the minimum build target is iOS 9, but when I build the library with Carthage, it shows an error when importing it into a project with minimum build target as iOS 10.3, say gin that minimum build target for the framework is iOS 11.

iPhone X Simulator layout bug

The cells oscillate wildly left/right/up/down on the XCode 9 (GM) iPhone X simulator with the example project (just whip the collection view up and down a couple of times).

I created a new project and it does the same thing for mine.

I would imagine this is a simulator bug, but wanted to make sure it was on your radar.

Great library, btw!

Swift Compiler Error

I tried adding the pod to my project, but I keep getting an Swift Compiler Error. More specific “Swift Compiler Error - Command failed due to signal: Segmentation fault: 11”. I get the error when I add this line of code to the project:
let layout = VegaScrollFlowLayout()
Layout is an error type and I don’t know how to fix it

UICollectionViewFlowLayout has cached frame mismatch for index path

I got this message when I added and ran a test project:

UICollectionViewFlowLayout has cached frame mismatch for index path <NSIndexPath: 0xc000000000000016> {length = 2, path = 0 - 0} - cached value: {{20, 10.083407407407407}, {374, 84}}; expected value: {{20, 10}, {374, 84}}
This is likely occurring because the flow layout subclass Coin.VegaScrollFlowLayout is modifying attributes returned by UICollectionViewFlowLayout without copying them.

Any idea how to fix this? The one solution I found didn't work:

override func finalLayoutAttributesForDisappearingItemAtIndexPath(itemIndexPath: NSIndexPath) -> UICollectionViewLayoutAttributes? {
let attr = self.layoutAttributesForItemAtIndexPath(itemIndexPath)?.copy() as! UICollectionViewLayoutAttributes
// manipulate the attr
return attr
}

CocoaPods issue

Error during pod install

[!] No podspec found for VegaScrollFlowLayout in https://github.com/AppliKeySolutions/VegaScroll.git

Landscape Adjustment

If I want to use this on landscape view, specifically for iPad, where can I make the adjustment so that the cells stay centered?

ScrollToItem(at:) programmatically - Can I control the speed of animation?

Hi, I would like use VegaScroll in user-disabled mode and call action on button press to scroll to the next index. It all works fine, only problem is, that the animation is too fast and it doesn't look that great.

I found only one way to control it in viewDidLoad method:
collectionView.decelerationRate = UIScrollViewDecelerationRateNormal

But that doesn't quite do the trick. Is there a way to control the speed of scroll animation directly in VegaScroll class?

Thank you

Support animated data reloading

I'd love to be able to update the collectionView's data on the go. I found this code does the job:

let range = Range(uncheckedBounds: (0, collectionView.numberOfSections))
let indexSet = IndexSet(integersIn: range)
collectionView.reloadSections(indexSet)

However, running this, makes the app crash at line 112 because of an unexpected nil:

override open func layoutAttributesForItem(at indexPath: IndexPath) -> UICollectionViewLayoutAttributes? {
    return dynamicAnimator.layoutAttributesForCell(at: indexPath)!
}

I tried removing the ! to prevent the force-unwrapping of a nil variable, but that resulted in a generic terminating with uncaught exception of type NSException.

Any way we can update the data at runtime while viewing the collectionView?
I'm thinking of some cool animation: the cell that's to be removed scales down, then the cells below move up smoothly w/ a .easeOut curve. Would be awesome. Thanks!

Cells moving

When I scroll through the cells, they start doing a circular movement faster and faster after a few scrolls.
See it in video here : http:/tinypic.com/r/110wzso/9

Is it normal ? I was not able to reproduce this in the Example project.

Less than six cell freezen and scrollToTop buggy.

Is it a maintaining project? I found out two places that is not good for user interface. One is the collection is not scrollable when cell number is less than six or seven. I hope it can be like bounce affect even if so. second one is when i touch the top of the screen. it goes back to top, but get a gap between first cell and large title, it looks a bit ugly. i hope it can be fixed. thx

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.