add examples
This commit is contained in:
parent
1137b47af1
commit
740768fdfd
|
|
@ -0,0 +1,39 @@
|
|||
//
|
||||
// AutolayoutCellsController.swift
|
||||
// TableKitDemo
|
||||
//
|
||||
// Created by Max Sokolov on 18/06/16.
|
||||
// Copyright © 2016 Tablet. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import TableKit
|
||||
|
||||
class AutolayoutCellsController: UIViewController {
|
||||
|
||||
@IBOutlet weak var tableView: UITableView! {
|
||||
didSet {
|
||||
tableDirector = TableDirector(tableView: tableView)
|
||||
tableDirector.register(ConfigurableTableViewCell.self)
|
||||
}
|
||||
}
|
||||
var tableDirector: TableDirector!
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
title = "Autolayout cells"
|
||||
|
||||
let section = TableSection()
|
||||
|
||||
var rows = 0
|
||||
while rows <= 10 {
|
||||
rows += 1
|
||||
|
||||
let row = TableRow<Void, AutolayoutTableViewCell>(item: ())
|
||||
section += row
|
||||
}
|
||||
|
||||
tableDirector += section
|
||||
}
|
||||
}
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
//
|
||||
// HeaderFooterController.swift
|
||||
// TabletDemo
|
||||
//
|
||||
// Created by Max Sokolov on 16/04/16.
|
||||
// Copyright © 2016 Tablet. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import TableKit
|
||||
|
||||
class HeaderFooterController: UIViewController {
|
||||
|
||||
@IBOutlet weak var tableView: UITableView! {
|
||||
didSet {
|
||||
tableDirector = TableDirector(tableView: tableView)
|
||||
}
|
||||
}
|
||||
var tableDirector: TableDirector!
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
//let rows = TableRowBuilder<String, StoryboardTableViewCell>(items: ["3", "4", "5"])
|
||||
|
||||
//let headerView = UIView(frame: CGRectMake(0, 0, 100, 100))
|
||||
//headerView.backgroundColor = UIColor.lightGrayColor()
|
||||
|
||||
//let section = TableSectionBuilder(headerView: headerView, footerView: nil, rows: [rows])
|
||||
|
||||
//tableDirector += section
|
||||
}
|
||||
}
|
||||
|
|
@ -14,43 +14,38 @@ class MainController: UIViewController {
|
|||
@IBOutlet weak var tableView: UITableView! {
|
||||
didSet {
|
||||
tableDirector = TableDirector(tableView: tableView)
|
||||
tableDirector.shouldUsePrototypeCellHeightCalculation = true
|
||||
tableDirector.register(ConfigurableTableViewCell.self)
|
||||
}
|
||||
}
|
||||
var tableDirector: TableDirector!
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
title = "TableKit"
|
||||
|
||||
let a = TableRowAction<String, StoryboardImageTableViewCell>(.click) {
|
||||
(data) in
|
||||
let clickAction = TableRowAction<String, ConfigurableTableViewCell>(.click) { [weak self] (data) in
|
||||
|
||||
print("3", data.item)
|
||||
switch data.path.row {
|
||||
case 0:
|
||||
self?.performSegueWithIdentifier("autolayoutcells", sender: nil)
|
||||
case 1:
|
||||
self?.performSegueWithIdentifier("rowbuildercells", sender: nil)
|
||||
case 2:
|
||||
self?.performSegueWithIdentifier("nibcells", sender: nil)
|
||||
default:
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
let b = TableRowBuilder<String, StoryboardImageTableViewCell>(items: ["1", "2", "3"], actions: [a])
|
||||
|
||||
|
||||
let row1 = TableRow<String, StoryboardImageTableViewCell>(item: "1")
|
||||
let row2 = TableRow<String, StoryboardImageTableViewCell>(item: "2")
|
||||
let row3 = TableRow<String, StoryboardImageTableViewCell>(item: "3", actions: [a])
|
||||
let rows: [Row] = [
|
||||
|
||||
row1
|
||||
.action(TableRowAction(.shouldHighlight) { (data) -> Bool in
|
||||
TableRow<String, ConfigurableTableViewCell>(item: "Autolayout cells", actions: [clickAction]),
|
||||
TableRow<String, ConfigurableTableViewCell>(item: "Row builder cells", actions: [clickAction]),
|
||||
TableRow<String, ConfigurableTableViewCell>(item: "Nib cells", actions: [clickAction])
|
||||
]
|
||||
|
||||
print("1")
|
||||
|
||||
return false
|
||||
})
|
||||
.action(TableRowAction(.click) { (data) in
|
||||
|
||||
print("2")
|
||||
})
|
||||
|
||||
let section = TableSection()
|
||||
section.append(builder: b)
|
||||
|
||||
tableDirector += [section]
|
||||
// automatically creates a section, also could be used like tableDirector.append(rows: rows)
|
||||
tableDirector += rows
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
//
|
||||
// NibCellsController.swift
|
||||
// TableKitDemo
|
||||
//
|
||||
// Created by Max Sokolov on 18/06/16.
|
||||
// Copyright © 2016 Tablet. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import TableKit
|
||||
|
||||
class NibCellsController: UITableViewController {
|
||||
|
||||
var tableDirector: TableDirector!
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
title = "Nib cells"
|
||||
|
||||
tableDirector = TableDirector(tableView: tableView)
|
||||
tableDirector.register(NibTableViewCell.self)
|
||||
|
||||
let numbers = [1000, 2000, 3000, 4000, 5000]
|
||||
|
||||
let shouldHighlightAction = TableRowAction<Int, NibTableViewCell>(.shouldHighlight) { (_) -> Bool in
|
||||
return false
|
||||
}
|
||||
|
||||
let rows: [Row] = numbers.map { TableRow<Int, NibTableViewCell>(item: $0, actions: [shouldHighlightAction]) }
|
||||
|
||||
tableDirector.append(rows: rows)
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
//
|
||||
// RowBuilderCellsController.swift
|
||||
// TableKitDemo
|
||||
//
|
||||
// Created by Max Sokolov on 18/06/16.
|
||||
// Copyright © 2016 Tablet. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import TableKit
|
||||
|
||||
class RowBuilderCellsController: UIViewController {
|
||||
|
||||
@IBOutlet weak var tableView: UITableView! {
|
||||
didSet {
|
||||
tableDirector = TableDirector(tableView: tableView)
|
||||
tableDirector.register(ConfigurableTableViewCell.self)
|
||||
}
|
||||
}
|
||||
var tableDirector: TableDirector!
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
title = "Row builder cells"
|
||||
|
||||
let numbers = ["1", "2", "3", "4", "5"]
|
||||
|
||||
let clickAction = TableRowAction<String, ConfigurableTableViewCell>(.click) { [weak self] (data) in
|
||||
|
||||
let alert = UIAlertController(title: nil, message: data.item, preferredStyle: .Alert)
|
||||
alert.addAction(UIAlertAction(title: "OK", style: .Default, handler: nil))
|
||||
|
||||
self?.presentViewController(alert, animated: true, completion: nil)
|
||||
}
|
||||
|
||||
let rowBuilder = TableRowBuilder<String, ConfigurableTableViewCell>(items: numbers, actions: [clickAction])
|
||||
|
||||
let section = TableSection(headerTitle: "Header title", footerTitle: "Footer title")
|
||||
|
||||
section.append(builder: rowBuilder)
|
||||
|
||||
tableDirector.append(section: section)
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
//
|
||||
// AutolayoutTableViewCell.swift
|
||||
// TabletDemo
|
||||
//
|
||||
// Created by Max Sokolov on 24/05/16.
|
||||
// Copyright © 2016 Tablet. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import TableKit
|
||||
|
||||
private let LoremIpsumTitle = "Lorem ipsum dolor sit amet, consectetur adipisicing elit"
|
||||
private let LoremIpsumBody = "Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eius adipisci, sed libero. Iste asperiores suscipit, consequatur debitis animi impedit numquam facilis iusto porro labore dolorem, maxime magni incidunt. Delectus, est! Totam at eius excepturi deleniti sed, error repellat itaque omnis maiores tempora ratione dolor velit minus porro aspernatur repudiandae labore quas adipisci esse, nulla tempore voluptatibus cupiditate. Ab provident, atque. Possimus deserunt nisi perferendis, consequuntur odio et aperiam, est, dicta dolor itaque sunt laborum, magni qui optio illum dolore laudantium similique harum. Eveniet quis, libero eligendi delectus repellendus repudiandae ipsum? Vel nam odio dolorem, voluptas sequi minus quo tempore, animi est quia earum maxime. Reiciendis quae repellat, modi non, veniam natus soluta at optio vitae in excepturi minima eveniet dolor."
|
||||
|
||||
class AutolayoutTableViewCell: UITableViewCell, ConfigurableCell {
|
||||
|
||||
typealias T = Void
|
||||
|
||||
@IBOutlet var titleLabel: UILabel!
|
||||
@IBOutlet var subtitleLabel: UILabel!
|
||||
|
||||
func configure(string: T, isPrototype: Bool) {
|
||||
|
||||
titleLabel.text = LoremIpsumTitle
|
||||
subtitleLabel.text = LoremIpsumBody
|
||||
}
|
||||
|
||||
static func estimatedHeight() -> CGFloat {
|
||||
return 500
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
//
|
||||
// ConfigurableTableViewCell.swift
|
||||
// TableKitDemo
|
||||
//
|
||||
// Created by Max Sokolov on 18/06/16.
|
||||
// Copyright © 2016 Tablet. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import TableKit
|
||||
|
||||
class ConfigurableTableViewCell: UITableViewCell, ConfigurableCell {
|
||||
|
||||
func configure(text: String, isPrototype: Bool) {
|
||||
|
||||
accessoryType = .DisclosureIndicator
|
||||
textLabel?.text = text
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
//
|
||||
// NibTableViewCell.swift
|
||||
// TableKitDemo
|
||||
//
|
||||
// Created by Max Sokolov on 18/06/16.
|
||||
// Copyright © 2016 Tablet. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import TableKit
|
||||
|
||||
class NibTableViewCell: UITableViewCell, ConfigurableCell {
|
||||
|
||||
@IBOutlet weak var titleLabel: UILabel!
|
||||
|
||||
func configure(number: Int, isPrototype: Bool) {
|
||||
titleLabel.text = "\(number)"
|
||||
}
|
||||
|
||||
static func defaultHeight() -> CGFloat? {
|
||||
return 100
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="10116" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="NibTableViewCell" id="4JI-V9-Bra" customClass="NibTableViewCell" customModule="TableKitDemo" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="4JI-V9-Bra" id="Bal-V1-EZ2">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="43"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qBe-iP-Q1p">
|
||||
<rect key="frame" x="8" y="11" width="45" height="21"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="17"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="qBe-iP-Q1p" firstAttribute="centerY" secondItem="Bal-V1-EZ2" secondAttribute="centerY" id="8gn-1I-szV"/>
|
||||
<constraint firstItem="qBe-iP-Q1p" firstAttribute="leading" secondItem="Bal-V1-EZ2" secondAttribute="leading" constant="8" id="xMK-TB-Bis"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<connections>
|
||||
<outlet property="titleLabel" destination="qBe-iP-Q1p" id="UO4-lc-Kr0"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="524" y="319"/>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
</document>
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
//
|
||||
// StoryboardImageTableViewCell.swift
|
||||
// TabletDemo
|
||||
//
|
||||
// Created by Max Sokolov on 24/05/16.
|
||||
// Copyright © 2016 Tablet. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import TableKit
|
||||
|
||||
class StoryboardImageTableViewCell: UITableViewCell, ConfigurableCell {
|
||||
|
||||
typealias T = String
|
||||
|
||||
@IBOutlet var titleLabel: UILabel!
|
||||
@IBOutlet var subtitleLabel: UILabel!
|
||||
@IBOutlet var customImageView: UIImageView!
|
||||
|
||||
func configure(string: T, isPrototype: Bool) {
|
||||
|
||||
titleLabel.text = string
|
||||
subtitleLabel.text = "Copyright © 2016 Tablet. All rights reserved.Copyright © 2016 Tablet. All rights reserved.Copyright © 2016 Tablet. All rights reserved.Copyright © 2016 Tablet. All rights reserved.Copyright © 2016 Tablet. All rights reserved.Copyright © 2016 Tablet. All rights reserved.Copyright © 2016 Tablet. All rights reserved.Copyright © 2016 Tablet. All rights reserved.Copyright © 2016 Tablet. All rights reserved.Copyright © 2016 Tablet. All rights reserved.Copyright © 2016 Tablet. All rights reserved.1"
|
||||
}
|
||||
|
||||
static func estimatedHeight() -> CGFloat {
|
||||
return 500
|
||||
}
|
||||
|
||||
override func layoutSubviews() {
|
||||
super.layoutSubviews()
|
||||
|
||||
contentView.layoutIfNeeded()
|
||||
subtitleLabel.preferredMaxLayoutWidth = subtitleLabel.bounds.size.width
|
||||
}
|
||||
}
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
//
|
||||
// StoryboardTableViewCell.swift
|
||||
// TabletDemo
|
||||
//
|
||||
// Created by Max Sokolov on 16/04/16.
|
||||
// Copyright © 2016 Tablet. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import TableKit
|
||||
|
||||
class StoryboardTableViewCell: UITableViewCell, ConfigurableCell {
|
||||
|
||||
typealias T = String
|
||||
|
||||
func configure(value: T, isPrototype: Bool) {
|
||||
textLabel?.text = value
|
||||
}
|
||||
}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10116" systemVersion="15G7b" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" initialViewController="01J-lp-oVM">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10116" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" initialViewController="01J-lp-oVM">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10116" systemVersion="15G7b" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="dOU-ON-YYD">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10116" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="dOU-ON-YYD">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
|
||||
|
|
@ -16,17 +16,17 @@
|
|||
</navigationBar>
|
||||
<nil name="viewControllers"/>
|
||||
<connections>
|
||||
<segue destination="grv-aL-Qbb" kind="relationship" relationship="rootViewController" id="0SZ-hs-iUi"/>
|
||||
<segue destination="hPs-tQ-ZjY" kind="relationship" relationship="rootViewController" id="cVN-5m-Nvf"/>
|
||||
</connections>
|
||||
</navigationController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="1px-T5-UXL" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="334" y="287"/>
|
||||
</scene>
|
||||
<!--Main Controller-->
|
||||
<!--Autolayout Cells Controller-->
|
||||
<scene sceneID="bgC-Xq-OSw">
|
||||
<objects>
|
||||
<viewController id="grv-aL-Qbb" customClass="MainController" customModule="TableKitDemo" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<viewController id="grv-aL-Qbb" customClass="AutolayoutCellsController" customModule="TableKitDemo" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="COn-EH-LKP"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="iga-ib-rj1"/>
|
||||
|
|
@ -39,7 +39,7 @@
|
|||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<prototypes>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="StoryboardImageTableViewCell" rowHeight="141" id="IBY-tW-SgU" customClass="StoryboardImageTableViewCell" customModule="TableKitDemo" customModuleProvider="target">
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="AutolayoutTableViewCell" rowHeight="141" id="IBY-tW-SgU" customClass="AutolayoutTableViewCell" customModule="TableKitDemo" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="92" width="600" height="141"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="IBY-tW-SgU" id="UNZ-nz-200">
|
||||
|
|
@ -49,7 +49,7 @@
|
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="751" verticalHuggingPriority="751" horizontalCompressionResistancePriority="751" verticalCompressionResistancePriority="751" placeholderIntrinsicWidth="172" placeholderIntrinsicHeight="21" text="Title" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="YnK-4H-0SS">
|
||||
<rect key="frame" x="128" y="20" width="452" height="21"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="750" verticalHuggingPriority="750" placeholderIntrinsicWidth="172" placeholderIntrinsicHeight="18" text="Subtitle" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="oPO-9F-UcX">
|
||||
|
|
@ -60,10 +60,16 @@
|
|||
</label>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="il6-0T-Sfb">
|
||||
<rect key="frame" x="20" y="20" width="100" height="100"/>
|
||||
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" priority="999" constant="100" id="Ryh-cg-Q69"/>
|
||||
<constraint firstAttribute="height" priority="999" constant="100" id="cjb-Sw-psw"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
|
||||
<integer key="value" value="4"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</imageView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
|
|
@ -80,19 +86,10 @@
|
|||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<connections>
|
||||
<outlet property="customImageView" destination="il6-0T-Sfb" id="Ufi-6Y-Vuf"/>
|
||||
<outlet property="subtitleLabel" destination="oPO-9F-UcX" id="RIK-1t-nVt"/>
|
||||
<outlet property="titleLabel" destination="YnK-4H-0SS" id="ilA-7H-pq7"/>
|
||||
</connections>
|
||||
</tableViewCell>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="StoryboardTableViewCell" id="nE5-Y5-OFf" customClass="StoryboardTableViewCell" customModule="TableKitDemo" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="233" width="600" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="nE5-Y5-OFf" id="3yF-sl-yNq">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="43"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
</prototypes>
|
||||
</tableView>
|
||||
</subviews>
|
||||
|
|
@ -107,17 +104,53 @@
|
|||
<navigationItem key="navigationItem" id="HPV-jJ-NPc"/>
|
||||
<connections>
|
||||
<outlet property="tableView" destination="o67-xJ-fPW" id="A8B-MV-tNa"/>
|
||||
<segue destination="sSs-TX-Ch0" kind="show" identifier="headerfooter" id="Nbk-od-yC5"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="xij-Hw-J33" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="1042" y="287"/>
|
||||
<point key="canvasLocation" x="1762" y="-59"/>
|
||||
</scene>
|
||||
<!--Header Footer Controller-->
|
||||
<!--Main Controller-->
|
||||
<scene sceneID="rB2-pg-ya1">
|
||||
<objects>
|
||||
<viewController id="hPs-tQ-ZjY" customClass="MainController" customModule="TableKitDemo" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="bj8-sc-pHV"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="exD-V1-XKl"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="w1B-sD-vvx">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="lVS-GW-taC">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</tableView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstItem="lVS-GW-taC" firstAttribute="leading" secondItem="w1B-sD-vvx" secondAttribute="leading" id="BML-us-tKv"/>
|
||||
<constraint firstItem="lVS-GW-taC" firstAttribute="top" secondItem="w1B-sD-vvx" secondAttribute="top" id="KmO-4D-EEl"/>
|
||||
<constraint firstItem="exD-V1-XKl" firstAttribute="top" secondItem="lVS-GW-taC" secondAttribute="bottom" id="plx-uF-bQd"/>
|
||||
<constraint firstAttribute="trailing" secondItem="lVS-GW-taC" secondAttribute="trailing" id="uYe-yd-m86"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<navigationItem key="navigationItem" id="i9y-B7-dhJ"/>
|
||||
<connections>
|
||||
<outlet property="tableView" destination="lVS-GW-taC" id="C28-ml-ARU"/>
|
||||
<segue destination="grv-aL-Qbb" kind="show" identifier="autolayoutcells" id="YrM-qz-6Kd"/>
|
||||
<segue destination="sSs-TX-Ch0" kind="show" identifier="rowbuildercells" id="bRQ-rh-ksD"/>
|
||||
<segue destination="apk-bL-6NO" kind="show" identifier="nibcells" id="gXD-XZ-oBm"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="i96-Zo-Wfg" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="1046" y="287"/>
|
||||
</scene>
|
||||
<!--Row Builder Cells Controller-->
|
||||
<scene sceneID="Jd0-of-RF9">
|
||||
<objects>
|
||||
<viewController id="sSs-TX-Ch0" customClass="HeaderFooterController" customModule="TableKitDemo" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<viewController id="sSs-TX-Ch0" customClass="RowBuilderCellsController" customModule="TableKitDemo" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="s9s-Gu-3M6"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="Tux-up-dnH"/>
|
||||
|
|
@ -126,19 +159,9 @@
|
|||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="uLr-Ff-utK">
|
||||
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="18" sectionFooterHeight="18" translatesAutoresizingMaskIntoConstraints="NO" id="uLr-Ff-utK">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<prototypes>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="StoryboardTableViewCell" id="lqW-2N-6mf" customClass="StoryboardTableViewCell" customModule="TableKitDemo" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="92" width="600" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="lqW-2N-6mf" id="tjN-ow-437">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="43"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
</prototypes>
|
||||
<color key="backgroundColor" red="0.93725490199999995" green="0.93725490199999995" blue="0.95686274510000002" alpha="1" colorSpace="calibratedRGB"/>
|
||||
</tableView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
|
|
@ -156,7 +179,35 @@
|
|||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="Gim-O8-I3d" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="1763" y="287"/>
|
||||
<point key="canvasLocation" x="1762" y="648"/>
|
||||
</scene>
|
||||
<!--Nib Cells Controller-->
|
||||
<scene sceneID="DHa-3S-OkR">
|
||||
<objects>
|
||||
<tableViewController id="apk-bL-6NO" customClass="NibCellsController" customModule="TableKitDemo" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" id="wDt-Cb-VB2">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<prototypes>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="bLH-h5-68i">
|
||||
<rect key="frame" x="0.0" y="92" width="600" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="bLH-h5-68i" id="dZ2-f8-07K">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="43"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
</prototypes>
|
||||
<connections>
|
||||
<outlet property="dataSource" destination="apk-bL-6NO" id="Xhe-U9-wKI"/>
|
||||
<outlet property="delegate" destination="apk-bL-6NO" id="NqC-Vg-68j"/>
|
||||
</connections>
|
||||
</tableView>
|
||||
</tableViewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="oWG-DK-A9C" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="1762" y="1366"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
</document>
|
||||
|
|
|
|||
|
|
@ -7,7 +7,13 @@
|
|||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
DA08A0531CF4E9B500BBF1F8 /* StoryboardImageTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA08A0521CF4E9B500BBF1F8 /* StoryboardImageTableViewCell.swift */; };
|
||||
DA08A0531CF4E9B500BBF1F8 /* AutolayoutTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA08A0521CF4E9B500BBF1F8 /* AutolayoutTableViewCell.swift */; };
|
||||
DA55465D1D1569CC00AA83EE /* AutolayoutCellsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA55465C1D1569CC00AA83EE /* AutolayoutCellsController.swift */; };
|
||||
DA5546601D156A4F00AA83EE /* ConfigurableTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA55465F1D156A4F00AA83EE /* ConfigurableTableViewCell.swift */; };
|
||||
DA5546621D1573D300AA83EE /* RowBuilderCellsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA5546611D1573D300AA83EE /* RowBuilderCellsController.swift */; };
|
||||
DA5546641D15762000AA83EE /* NibTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA5546631D15762000AA83EE /* NibTableViewCell.swift */; };
|
||||
DA5546661D15765900AA83EE /* NibTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = DA5546651D15765900AA83EE /* NibTableViewCell.xib */; };
|
||||
DA5546681D15771D00AA83EE /* NibCellsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA5546671D15771D00AA83EE /* NibCellsController.swift */; };
|
||||
DA9EA7D91D0EC65B0021F650 /* TableKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DA9EA7D61D0EC5C60021F650 /* TableKit.framework */; };
|
||||
DA9EA7DA1D0EC65B0021F650 /* TableKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = DA9EA7D61D0EC5C60021F650 /* TableKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
|
||||
DAC2D5CA1C9D303E009E9C19 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAC2D5C91C9D303E009E9C19 /* AppDelegate.swift */; };
|
||||
|
|
@ -15,8 +21,6 @@
|
|||
DAC2D5D01C9D30A7009E9C19 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DAC2D5CE1C9D30A7009E9C19 /* LaunchScreen.storyboard */; };
|
||||
DAC2D69C1C9E75E3009E9C19 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = DAC2D69B1C9E75E3009E9C19 /* Assets.xcassets */; };
|
||||
DACB71761CC2D63D00432BD3 /* MainController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DACB71751CC2D63D00432BD3 /* MainController.swift */; };
|
||||
DACB71781CC2D6ED00432BD3 /* StoryboardTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DACB71771CC2D6ED00432BD3 /* StoryboardTableViewCell.swift */; };
|
||||
DACB717A1CC2D89D00432BD3 /* HeaderFooterController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DACB71791CC2D89D00432BD3 /* HeaderFooterController.swift */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
|
|
@ -58,7 +62,13 @@
|
|||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
DA08A0521CF4E9B500BBF1F8 /* StoryboardImageTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StoryboardImageTableViewCell.swift; sourceTree = "<group>"; };
|
||||
DA08A0521CF4E9B500BBF1F8 /* AutolayoutTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AutolayoutTableViewCell.swift; sourceTree = "<group>"; };
|
||||
DA55465C1D1569CC00AA83EE /* AutolayoutCellsController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AutolayoutCellsController.swift; sourceTree = "<group>"; };
|
||||
DA55465F1D156A4F00AA83EE /* ConfigurableTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ConfigurableTableViewCell.swift; sourceTree = "<group>"; };
|
||||
DA5546611D1573D300AA83EE /* RowBuilderCellsController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RowBuilderCellsController.swift; sourceTree = "<group>"; };
|
||||
DA5546631D15762000AA83EE /* NibTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NibTableViewCell.swift; sourceTree = "<group>"; };
|
||||
DA5546651D15765900AA83EE /* NibTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = NibTableViewCell.xib; sourceTree = "<group>"; };
|
||||
DA5546671D15771D00AA83EE /* NibCellsController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NibCellsController.swift; sourceTree = "<group>"; };
|
||||
DA9EA7D01D0EC5C50021F650 /* TableKit.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = TableKit.xcodeproj; path = ../TableKit.xcodeproj; sourceTree = "<group>"; };
|
||||
DAB7EB271BEF787300D2AD5E /* TableKitDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TableKitDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
DAC2D5C91C9D303E009E9C19 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||
|
|
@ -67,8 +77,6 @@
|
|||
DAC2D69B1C9E75E3009E9C19 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||
DAC2D69D1C9E78B5009E9C19 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
DACB71751CC2D63D00432BD3 /* MainController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MainController.swift; sourceTree = "<group>"; };
|
||||
DACB71771CC2D6ED00432BD3 /* StoryboardTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StoryboardTableViewCell.swift; sourceTree = "<group>"; };
|
||||
DACB71791CC2D89D00432BD3 /* HeaderFooterController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HeaderFooterController.swift; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
|
|
@ -175,7 +183,9 @@
|
|||
isa = PBXGroup;
|
||||
children = (
|
||||
DACB71751CC2D63D00432BD3 /* MainController.swift */,
|
||||
DACB71791CC2D89D00432BD3 /* HeaderFooterController.swift */,
|
||||
DA55465C1D1569CC00AA83EE /* AutolayoutCellsController.swift */,
|
||||
DA5546611D1573D300AA83EE /* RowBuilderCellsController.swift */,
|
||||
DA5546671D15771D00AA83EE /* NibCellsController.swift */,
|
||||
);
|
||||
path = Controllers;
|
||||
sourceTree = "<group>";
|
||||
|
|
@ -183,8 +193,10 @@
|
|||
DACB71741CC2D5FD00432BD3 /* Views */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
DACB71771CC2D6ED00432BD3 /* StoryboardTableViewCell.swift */,
|
||||
DA08A0521CF4E9B500BBF1F8 /* StoryboardImageTableViewCell.swift */,
|
||||
DA55465F1D156A4F00AA83EE /* ConfigurableTableViewCell.swift */,
|
||||
DA08A0521CF4E9B500BBF1F8 /* AutolayoutTableViewCell.swift */,
|
||||
DA5546631D15762000AA83EE /* NibTableViewCell.swift */,
|
||||
DA5546651D15765900AA83EE /* NibTableViewCell.xib */,
|
||||
);
|
||||
path = Views;
|
||||
sourceTree = "<group>";
|
||||
|
|
@ -274,6 +286,7 @@
|
|||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
DAC2D5CF1C9D30A7009E9C19 /* Main.storyboard in Resources */,
|
||||
DA5546661D15765900AA83EE /* NibTableViewCell.xib in Resources */,
|
||||
DAC2D5D01C9D30A7009E9C19 /* LaunchScreen.storyboard in Resources */,
|
||||
DAC2D69C1C9E75E3009E9C19 /* Assets.xcassets in Resources */,
|
||||
);
|
||||
|
|
@ -286,11 +299,14 @@
|
|||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
DACB71781CC2D6ED00432BD3 /* StoryboardTableViewCell.swift in Sources */,
|
||||
DACB71761CC2D63D00432BD3 /* MainController.swift in Sources */,
|
||||
DA5546621D1573D300AA83EE /* RowBuilderCellsController.swift in Sources */,
|
||||
DA55465D1D1569CC00AA83EE /* AutolayoutCellsController.swift in Sources */,
|
||||
DA5546681D15771D00AA83EE /* NibCellsController.swift in Sources */,
|
||||
DAC2D5CA1C9D303E009E9C19 /* AppDelegate.swift in Sources */,
|
||||
DACB717A1CC2D89D00432BD3 /* HeaderFooterController.swift in Sources */,
|
||||
DA08A0531CF4E9B500BBF1F8 /* StoryboardImageTableViewCell.swift in Sources */,
|
||||
DA5546641D15762000AA83EE /* NibTableViewCell.swift in Sources */,
|
||||
DA5546601D156A4F00AA83EE /* ConfigurableTableViewCell.swift in Sources */,
|
||||
DA08A0531CF4E9B500BBF1F8 /* AutolayoutTableViewCell.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue