Latest 1.0
Homepage https://github.com/DavidMorenoDWeb/SwiftySlideUpController
License MIT
Platforms ios 12.1
Authors


CocoaPods

PlatformSwift 5.0License

SwiftySlideUpController is a Swift lightweight library to add a slide up controller with interactive animations easily

Installation

CocoaPods

To install SwiftySlideUpController with CocoaPods, add this to your Podfile:

pod 'SwiftySlideUpController'

Manual installation

To add SwiftySlideUpController to your app manually, clone this repo
and place it somewhere on disk, then add SwiftySlideUpController.xcodeproj to the project
and add SwiftySlideUpController.framework as an embedded app binary and target dependency.

Basic example

You can add a SlideUpController to your UIViewController and add your items to it easily.

// Creates the SlideUpController
var slideUpController: SlideUpControllerDefault = SlideUpControllerModule().buildDefault()

// Presents it in your current UIViewController        
slideUpController.present(in: self)

// Sets the header title
slideUpController.set(headerTitle: "Comments")

// Adds a couple of items
slideUpController.addItem(SlideUpControllerItem(data: SlideUpControllerItemData(title: "Your cool title", text: "The description text", image: nil), value: index, handler: { item in
                // Item click handler
                print("Item tapped with name: (String(describing: item.data.title))")
            }))

slideUpController.addItem(SlideUpControllerItem(data: SlideUpControllerItemData(title: "Your second item title", text: "The description text", image: nil), value: index, handler: { item in
                // Item click handler
                print("Item tapped with name: (String(describing: item.data.title))")
            }))

You can pass an UIImage to each item initializer as well in order to show the image in the cell.

You can change the header title color too:

slideUpController.set(mainColor: UIColor.blue)

Or the controller height, which can be useful to work with different orientations:

slideUpController.set(controllerHeight: 500)

Example project

The example project shows how to create a SlideUpController using custom objects and handling different orientations.

License

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

Latest podspec

{
    "name": "SwiftySlideUpController",
    "version": "1.0",
    "summary": "Slide up controller with interactive animations easy to use",
    "description": "SwiftySlideUpController is a Swift lightweight library to add a slide up controller with interactive animations easily",
    "homepage": "https://github.com/DavidMorenoDWeb/SwiftySlideUpController",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "David Moreno": "[email protected]"
    },
    "platforms": {
        "ios": "12.1"
    },
    "swift_version": "5",
    "source": {
        "git": "https://github.com/DavidMorenoDWeb/SwiftySlideUpController.git",
        "tag": "1.0"
    },
    "source_files": "SwiftySlideUpController/**/*.{h,m,swift}"
}

Pin It on Pinterest

Share This