Giter Club home page Giter Club logo

swipeupview's Introduction

SwipeUpView

CI Status Version License Platform

SCREENSHOT

Installation

SwipeUpView is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'SwipeUpView'

SwipeUpViewDatasource

extension ViewController : SwipeUpViewDatasource {

    func hideHeaderButton(_ swipeUpView: SwipeUpView) -> Bool {
        return false
    }

    func heightOfHeaderButton (_ swipeUpView : SwipeUpView) -> CGFloat {
        return 8.0
    }

    func widthOfHeaderButton (_ swipeUpView : SwipeUpView) -> CGFloat {
        return 50.0
    }

    func marginOfHeaderButton (_ swipeUpView : SwipeUpView) -> CGFloat {
        return 4.0
    }

    func colorOfHeaderButton (_ swipeUpView : SwipeUpView) -> UIColor {
        return .white
    }

    func firstOpenHeightIndex(_ swipeUpView: SwipeUpView) -> Int {
        return 1
    }

    ////SETTING HEIGHTS
    //if heights returns a non-empty CGFloat array, heightPercentages return value is not important
    func heights(_ swipeUpView: SwipeUpView) -> [CGFloat] {
        return [100, 300, 600]
    }
    
    func heightPercentages(_ swipeUpView: SwipeUpView) -> [CGFloat] {
        return [0.1, 0.5, 0.95]
    }
    ////

    ////SETTING HEIGHTS - 2
    //if heights returns an empty CGFloat array, heightPercentages return value will be used
    func heights(_ swipeUpView: SwipeUpView) -> [CGFloat] {
        return []
    }

    func heightPercentages(_ swipeUpView: SwipeUpView) -> [CGFloat] {
        return [0.1, 0.5, 0.95]
    }
    ////

}

SwipeUpViewDelegate

extension ViewController : SwipeUpViewDelegate {

    func swipeUpViewStateWillChange (_ swipeUpView : SwipeUpView, stateIndex : Int){
        NSLog("SwipeUpView state will change to %i", stateIndex)
    }

    func swipeUpViewStateDidChange (_ swipeUpView : SwipeUpView, stateIndex : Int){
        NSLog("SwipeUpView state did change to %i", stateIndex)
    }

    func swipeUpViewWillOpen (_ swipeUpView : SwipeUpView){
        NSLog("SwipeUpView state will open")
    }

    func swipeUpViewDidOpen (_ swipeUpView : SwipeUpView){
        NSLog("SwipeUpView state did open")
    }

    func swipeUpViewWillClose (_ swipeUpView : SwipeUpView){
        NSLog("SwipeUpView state will close")
    }

    func swipeUpViewDidClose (_ swipeUpView : SwipeUpView){
        NSLog("SwipeUpView state did close")
    }

}

Authors

Zingat Mobile Team

License

SwipUpView is available under the MIT license. See the LICENSE file for more info.

swipeupview's People

Contributors

kadirkemal avatar barisgungor avatar cinaryusufiu avatar mortgy avatar bahriyebegumultangungor avatar olkunmustafa avatar

Stargazers

Yigit Yilmaz avatar Mr.Sanchez avatar Carabineiro avatar

Watchers

Mustafa Ileri avatar James Cloos avatar  avatar Carabineiro avatar  avatar  avatar Necip Arg avatar Şevval Serbes avatar  avatar  avatar  avatar Zingat DevOps avatar Metin Yıldız avatar

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.