mrdekk / SplitRow

A row for Eureka to put two rows side by side into the same UITableViewCell

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SplitRow

A row for Eureka to put two rows side by side into the same UITableViewCell.

Platform iOS Swift 4 compatible Carthage compatible CocoaPods compatible License: MIT

By MANDELKIND.

Contents

Introduction

SplitRow is a custom row for Eureka designed to put two rows side by side into the same UITableViewCell.

Installation

CocoaPods

CocoaPods is a dependency manager for Cocoa projects.

Specify Eureka into your project's Podfile:

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

pod 'SplitRow'

Then run the following command:

$ pod install

Usage

import Eureka
import SplitRow

class ViewController: FormViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

        form +++ Section()
            <<< SplitRow<PushRow<String>,TextRow>(){
		$0.rowLeft = PushRow<String>(){
			$0.selectorTitle = "E-Mail"
			$0.options = ["Private","Work","Others"]
		}

		$0.rowRight = TextRow(){
			$0.placeholder = "E-Mail"
		}

		}.onChange{
			print("SplitRow.onChange:","left:",$0.value?.left,"right:",$0.value?.right)
		}
    }
}

Example by changing the percentage of the row on the right

import Eureka
import SplitRow

class ViewController: FormViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

        form +++ Section()
            <<< SplitRow<PushRow<String>,TextRow>(){
		$0.rowLeftPercentage = 0.5
			$0.rowLeft = PushRow<String>(){
			$0.selectorTitle = "E-Mail"
			$0.options = ["Private","Work","Others"]
		}
					
		$0.rowRight = TextRow(){
			$0.placeholder = "E-Mail"
		}
				
        	}.onChange{
        		print("SplitRow.onChange:","left:",$0.value?.left,"right:",$0.value?.right)
        	}
    }
}

Requirements

  • iOS 9.0+
  • Xcode 9.0+
  • Eureka ~> 4.1

Getting involved

  • If you want to contribute please feel free to submit pull requests.
  • If you have a feature request please open an issue.

Author

About

A row for Eureka to put two rows side by side into the same UITableViewCell

License:MIT License


Languages

Language:Swift 92.3%Language:Ruby 5.4%Language:Objective-C 2.3%