Giter Club home page Giter Club logo

jt3dscrollview's Introduction

JT3DScrollView

CI Status Version License Platform

JT3DScrollView is a UIScrollView with custom effects during the scroll.

Installation

With CocoaPods, add this line to your Podfile.

pod 'JT3DScrollView', '~> 2.0'

Screenshots

Example

Usage

You can use it like a classic UIScrollView, the isPagingEnabled is set to true by default and clipsToBounds is set to false.

import UIKit
import JT3DScrollView

class ViewController: UIViewController {

    @IBOutlet weak var scrollView: JT3DScrollView?

    override func viewDidLoad() {
        super.viewDidLoad()
        scrollView?.effect = .cards
    }
}

You can disable the effect and act like a classic UIScrollView by setting effect to .none.

Effects are just preset for some properties used for the animations, you can adjust all effects with:

  • angleRatio
  • rotationX
  • rotationY
  • rotationZ
  • translateX
  • translateY

All this properties are relative to the position X of the subview.

Requirements

  • iOS 8 or higher
  • Swift 3.0

Author

License

JT3DScrollView is released under the MIT license. See the LICENSE file for more info.

jt3dscrollview's People

Contributors

johnvuko 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

jt3dscrollview's Issues

Paging

I added this as a horizontal scroll view to an app that only uses landscape orientation. I can't stop it from allowing vertical scrolling. It also does not page the the correct x coordinate. Only the first subview is in the correct position. I'm developing on iOS 9.3. Any help would be appreciated.

Drag from outside the JT3DScrollView frame

The first thing I wanted to do with this View was drag on one of the images that was outside the View's frame. (The JT3DScrollView has clipsToBounds set to false, so the previous and next โ€” and maybe others โ€” show outside the View proper.)

The way to do this is to embed the JT3DScrollView in another view. Make the enclosing view a custom subclass of UIView and add this and only this method:

 override func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? {
    if self.point(inside: point, with: nil) {
        return subviews.first
    } else {
        return super.hitTest(point, with: event)
    }
}

Now drags in the enclosing view will be passed to the enclosed JT3DScrollView. Have fun! And thanks JT for such a clean implementation.

Infinite scroll

How to make scrollview to scroll in infinite loop ? Please adivse.

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.