https://github.com/pratikpanchal13/patrickmultipleselectiontableview
TableView Multiple Selection
https://github.com/pratikpanchal13/patrickmultipleselectiontableview
ios multiple selection swift-3 uitableview
Last synced: 12 months ago
JSON representation
TableView Multiple Selection
- Host: GitHub
- URL: https://github.com/pratikpanchal13/patrickmultipleselectiontableview
- Owner: pratikpanchal13
- License: mit
- Created: 2017-04-03T08:38:51.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-09-15T11:25:40.000Z (over 8 years ago)
- Last Synced: 2025-04-09T23:53:10.064Z (12 months ago)
- Topics: ios, multiple, selection, swift-3, uitableview
- Language: Swift
- Size: 309 KB
- Stars: 10
- Watchers: 4
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

# PatrickMultipleSelectionTableview
[](https://travis-ci.org/pratikpanchal131/PatrickMultipleSelectionTableview)
[](http://cocoapods.org/pods/PatrickMultipleSelectionTableview)
[](http://cocoapods.org/pods/PatrickMultipleSelectionTableview)
[](http://cocoapods.org/pods/PatrickMultipleSelectionTableview)
## Example
To run the example project, clone the repo, and run `pod install` from the Example directory first.
## Requirements
* Swift 3.0
* Xcode 8
* iOS 9.0+
## Installation
#### [CocoaPods](http://cocoapods.org) (recommended)
MST1 is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile
````ruby
use_frameworks!
pod 'PatrickMultipleSelectionTableview', :git => 'https://github.com/pratikpanchal13/PatrickMultipleSelectionTableview.git'
````
## USAGE
import PatrickMultipleSelectionTableview in ViewController.swift
````ruby
import PatrickMultipleSelectionTableview
````
To Show MulitpleSelection Controller in your Controller Call Function showMultipleSelection()
````ruby
func showMultipleSelectionTableview()
{
let podBundle = Bundle(for: PKMulipleSelectionVC.self)
let bundleURL = podBundle.url(forResource: "PatrickMultipleSelectionTableview", withExtension: "bundle")
let bundle = Bundle(url: bundleURL!)!
let storyboard = UIStoryboard(name: "Main", bundle: bundle)
let vc:PKMulipleSelectionVC = storyboard.instantiateViewController(withIdentifier: "PKMulipleSelectionVC") as! PKMulipleSelectionVC
vc.arrContent = ["IPhone","IMac","IPad","MacBook","IPod","MacMini","Apple TV"] // Pass Array Data
vc.backgroundColorDoneButton = UIColor.init(colorLiteralRed: 87.0/255.0, green: 188.0/255.0, blue: 100.0/255.0, alpha: 1.0)
vc.backgroundColorHeaderView = UIColor.init(colorLiteralRed: 76.0/255.0, green: 82.0/255.0, blue: 83.0/255.0, alpha: 1.0)
vc.backgroundColorTableView = UIColor.init(colorLiteralRed: 59.0/255.0, green: 65.0/255.0, blue: 66.0/255.0, alpha: 1.0)
vc.backgroundColorCellTitle = UIColor.init(colorLiteralRed: 87.0/255.0, green: 188.0/255.0, blue: 100.0/255.0, alpha: 1.0)
vc.backgroundColorDoneTitle = UIColor.white
vc.backgroundColorSelectALlTitle = UIColor.white
// Get Selected Index from PKMultipleSelectionVC
if let returnIndex = UserDefaults.standard.object(forKey: "indexPath") as? [Int] {
vc.objGetSelectedIndex = returnIndex
}
// Data Passing Usning Block
vc.passDataWithIndex = { arrayData, selectedIndex in
self.btnClickeMe.setTitle("\(arrayData)", for: UIControlState.normal)
UserDefaults.standard.set(arrayData, forKey: "data")
UserDefaults.standard.synchronize()
}
vc.willMove(toParentViewController: self)
self.view.addSubview(vc.view)
self.addChildViewController(vc)
vc.didMove(toParentViewController: self)
}
````
## Author
pratikpanchal131, pratik.panchal13@gmail.com
## License
PatrickMultipleSelectionTableview is available under the MIT license. See the LICENSE file for more info.