RollView

master

RollView is an iOS implementation of ListView on Android
gitvalue/RollView

RollView

RollView is an iOS implementation of ListView on Android

...

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

  • iOS 9.0+
  • Xcode 9.0+
  • Swift 4

Installing

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

To integrate RollView into your Xcode project using CocoaPods, specify it in your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
use_frameworks!

target '<Your Target Name>' do
    pod 'RollView', '~> 1.0'
end

Then, run the following command:

$ pod install

Swift Package Manager

Note: At this time there is no official support for iOS targets or the related system libraries in SPM. So read this before processing.

All you need is to define RollView dependency in your package manifest file:

import PackageDescription

let package = Package(
    name: "YourPackageName",
    products: [
        .library(name: "YourPackageName", targets: ["YourPackageName"]),
    ],
    dependencies: [
        .package(url: "https://github.com/gitvalue/RollView.git", from: "1.0.0"),
    ],
    targets: [
        .target(
            name: "YourPackageName",
            dependencies: ["RollView"]),
        .testTarget(
            name: "YourPackageNameTests",
            dependencies: ["RollView"]),
    ]
)

and then run

$ swift fetch

Carthage

Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.

You can install Carthage with Homebrew using the following command:

$ brew update
$ brew install carthage

To integrate RollView into your Xcode project using Carthage, specify it in your Cartfile:

github "https://github.com/gitvalue/RollView" ~> 1.0.0

Run carthage update --platform iOS to build the framework and drag the built RollView into your Xcode project.

For more information read this

Manually

If you prefer not to use either of the aforementioned dependency managers, you can integrate RollView into your project manually by copying files from Source directory to your project and installing Pooling.

Deployment

Quick Start

import UIKit
import RollView

class RollViewAdapter: Adapter {
    // your adapter implementation
}

class MyViewController: UIViewController {
    var rollView: RollView!

    override func viewDidLoad() {
        super.viewDidLoad()

        rollView = RollView()
        rollView.adapter = RollViewAdapter()

        rollView.frame = view.frame
        rollView.autoresizingMask = [ .flexibleWidth, .flexibleHeight ]
        
        view.addSubview(rollView)
        
        rollView.reload()
    }
}

Notes

RollView reuses your views for memory-optimizations, so make sure that you initialize your views via init(frame: CGRect) designated initializer.

Versioning

This repo uses SemVer for versioning. For the versions available, see the tags on this repository.

Authors

  • Dmitry Volosach - Initial work - @vlk1994

License

This project is licensed under the MIT License - see the LICENSE file for details

Description

  • Swift Tools 4.0.0
View More Packages from this Author

Dependencies

Last updated: Wed Mar 20 2024 05:50:14 GMT-0900 (Hawaii-Aleutian Daylight Time)