bcylin / QuickTableViewController

A simple way to create a UITableView for settings in Swift.

Home Page:https://bcylin.github.io/QuickTableViewController

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TapActionCell should support left align

getaaron opened this issue · comments

Actions are often left aligned. TapActionCell should support this

image

I think this can be achieved by a customized cell:

class LeftAlignedTapActionCell: TapActionCell {

  override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
    super.init(style: .default, reuseIdentifier: reuseIdentifier)
    textLabel?.textAlignment = .left
  }

}
TapActionRow<LeftAlignedTapActionCell>(title: "Left aligned title", action: { _ in })