All Projects → azizuysal → AUPickerCell

azizuysal / AUPickerCell

Licence: MIT license
Embedded picker view for table cells.

Programming Languages

swift
15916 projects
ruby
36898 projects - #4 most used programming language
objective c
16641 projects - #2 most used programming language

Projects that are alternatives of or similar to AUPickerCell

Automatic Height Tagcells
This is a sample project to implement features with dynamic height of UITableViewCell based on autolayout, tags aligned automatically and clickable tags.
Stars: ✭ 229 (+1105.26%)
Mutual labels:  uitableview, uitableviewcell
Tablekit
Type-safe declarative table views.
Stars: ✭ 567 (+2884.21%)
Mutual labels:  uitableview, uitableviewcell
WBChainMenu
This will show horizontal menu to a UITableViewCell with chain animation
Stars: ✭ 28 (+47.37%)
Mutual labels:  uitableview, uitableviewcell
UITableViewCellAnimation
Basic tabeview cell animation for best way to display cell
Stars: ✭ 31 (+63.16%)
Mutual labels:  uitableview, uitableviewcell
Datasource
Simplifies the setup of UITableView data sources using type-safe descriptors for cells and sections. Animated diffing built-in.
Stars: ✭ 72 (+278.95%)
Mutual labels:  uitableview, uitableviewcell
TableViewKit
Empowering UITableView with painless multi-type cell support and built-in automatic state transition animations
Stars: ✭ 105 (+452.63%)
Mutual labels:  uitableview, uitableviewcell
Expandabletable
AZExpandable is a lightweight proxy for UITableView to expand cells.
Stars: ✭ 218 (+1047.37%)
Mutual labels:  uitableview, uitableviewcell
MXPickerView
MXPickerView is an encapsulation for UIPickerView and UIDatePicker
Stars: ✭ 23 (+21.05%)
Mutual labels:  uipickerview, uidatepicker
Mdl11 generics
Example project that was demonstrated on MDL #11 meetup - https://www.youtube.com/watch?v=A4FrEyFBjVA. Medium article - https://medium.com/chili-labs/configuring-multiple-cells-with-generics-in-swift-dcd5e209ba16
Stars: ✭ 50 (+163.16%)
Mutual labels:  uitableview, uitableviewcell
Gltablecollectionview
Netflix and App Store like UITableView with UICollectionView, written in pure Swift 4.2
Stars: ✭ 709 (+3631.58%)
Mutual labels:  uitableview, uitableviewcell
Multiple-collectionView-in-Multiple-tableView-cells
UICollectionView is embed in UITableViewCell. The collection views are horizontal scrollable. The UITableView can have a section title for each UICollectionView and the number of UICollectionView is equal to the number of sections.
Stars: ✭ 23 (+21.05%)
Mutual labels:  uitableview, uitableviewcell
Reverseextension
A UITableView extension that enables cell insertion from the bottom of a table view.
Stars: ✭ 1,631 (+8484.21%)
Mutual labels:  uitableview, uitableviewcell
TreeView
"TreeView - sub-cells simplified" (c). Enable subcells in UITableView with a single drop-in extension. CocoaPod:
Stars: ✭ 54 (+184.21%)
Mutual labels:  uitableview, uitableviewcell
Transfiguration
Mystical way to transform data into reusable view in Swift
Stars: ✭ 14 (-26.32%)
Mutual labels:  uitableview, uipickerview
Brpickerview
BRPickerView 封装的是iOS中常用的选择器组件,主要包括:日期选择器(支持年月日、年月等15种日期样式选择,支持设置星期、至今等)、地址选择器(支持省市区、省市、省三种地区选择)、自定义字符串选择器(支持单列、多列、二级联动、三级联动选择)。支持自定义主题样式,适配深色模式,支持将选择器组件添加到指定容器视图。
Stars: ✭ 2,149 (+11210.53%)
Mutual labels:  uipickerview, uidatepicker
Uitableviewdynamiclayoutcacheheight
🖖高性能的自动计算采用 Autolayout 布局的 UITableViewCell 和 UITableViewHeaderFooterView 的高度,内部自动管理高度缓存。
Stars: ✭ 360 (+1794.74%)
Mutual labels:  uitableview, uitableviewcell
Swipecellkit
A swipeable UITableViewCell or UICollectionViewCell with support for:
Stars: ✭ 5,745 (+30136.84%)
Mutual labels:  uitableview, uitableviewcell
Tdbadgedcell
TDBadgedCell is a table view cell class that adds a badge, similar to the badges in Apple's own apps
Stars: ✭ 1,444 (+7500%)
Mutual labels:  uitableview, uitableviewcell
Closures
Swifty closures for UIKit and Foundation
Stars: ✭ 1,720 (+8952.63%)
Mutual labels:  uitableview, uipickerview
Vbpiledview
Simple and beautiful stacked UIView to use as a replacement for an UITableView, UIImageView or as a menu
Stars: ✭ 164 (+763.16%)
Mutual labels:  uitableview

Language Carthage compatible CocoaPods compatible Build Status

AUPickerCell

Embedded picker view for table cells.

AUPickerCell animated GIF

Requirements

AUPickerCell requires Swift 5.0 and Xcode 10.2.

Installation

CocoaPods

You can use CocoaPods to integrate AUPickerCell with your project.

Simply add the following line to your Podfile:

pod "AUPickerCell"

And run pod update in your project directory.

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 AUPickerCell into your Xcode project using Carthage, specify it in your Cartfile:

github "azizuysal/AUPickerCell"

Run carthage update to build the framework and drag the built AUPickerCell.framework into your Xcode project.

Manually

You can integrate AUPickerCell manually into your project simply by dragging AUPickerCell.framework onto Linked Frameworks and Libraries section in Xcode, or by copying AUPickerCell.swift source file in to your project.

Usage

You can use AUPickerCell in your UITableView like any other UITableViewCell subclass:

override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
  let cell = AUPickerCell(type: .default, reuseIdentifier: "TableCell")
  cell.values = ["One", "Two", "Three"]
  cell.selectedRow = 1
  cell.leftLabel.text = "Options"
  return cell
}

Afterwards, implement the following boilerplate in your UITableViewDelegate to support automatic cell expansion to display the picker:

override func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
  if let cell = tableView.cellForRow(at: indexPath) as? AUPickerCell {
    return cell.height
  }
  return super.tableView(tableView, heightForRowAt: indexPath)
}

override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
  tableView.deselectRow(at: indexPath, animated: true)
  if let cell = tableView.cellForRow(at: indexPath) as? AUPickerCell {
    cell.selectedInTableView(tableView)
  }
}

The above example produces a cell with an embedded UIPickerView but you can just as easily create a cell with an embedded UIDatePicker by setting the picker type to .date, as below:

let cell = AUPickerCell(type: .date, reuseIdentifier: "PickerDateCell")

Upon user interaction, cell will auto update the right label text to reflect user's choice. You can also implement a delegate method to be notified of user's selection:

class MyViewController: UITableViewController, AUPickerCellDelegate {
  override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
    let cell = AUPickerCell(type: .default, reuseIdentifier: "PickerDefaultCell")
    cell.delegate = self
    ...
  }
}

func auPickerCell(_ cell: AUPickerCell, didPick row: Int, value: Any) {
  self.pickedValue = value as! String
  ...
}

or, in the case of a date picker:

func auPickerCell(_ cell: AUPickerCell, didPick row: Int, value: Any) {
  self.pickedDate = value as! Date
  ...
}

License

The MIT License (MIT)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].