Latest 1.2.0
Homepage https://github.com/zingat/SwipeUpView
License MIT
Platforms ios 8.0
Authors ,

CI Status
Version
License
Platform

SCREENSHOT

SwipeUpView

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.

Latest podspec

{
    "name": "SwipeUpView",
    "version": "1.2.0",
    "summary": "You can easly create swipeable views by using SwipeUpView",
    "description": "SwipeUpView is used to create swipeable views. This is very useful to build swipe-based views. The interface is as simple as UIKit's.",
    "homepage": "https://github.com/zingat/SwipeUpView",
    "screenshots": "https://raw.githubusercontent.com/zingat/SwipeUpView/master/SwipeUpView.gif",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Kadir Kemal Dursun": "[email protected]",
        "Yusuf u00c7u0131nar": "[email protected]"
    },
    "source": {
        "git": "https://github.com/zingat/SwipeUpView.git",
        "tag": "1.2.0"
    },
    "platforms": {
        "ios": "8.0"
    },
    "pod_target_xcconfig": {
        "SWIFT_VERSION": "3.0"
    },
    "source_files": "SwipeUpView/Classes/**/*"
}

Pin It on Pinterest

Share This