diff --git a/Tablet/TableDirector.swift b/Tablet/TableDirector.swift index 087e953..cbe110c 100644 --- a/Tablet/TableDirector.swift +++ b/Tablet/TableDirector.swift @@ -179,7 +179,7 @@ public extension TableDirector { } } -extension TableDirector { +public extension TableDirector { // MARK: Sections manipulation diff --git a/TabletDemo/TabletDemo.xcodeproj/project.pbxproj b/TabletDemo/TabletDemo.xcodeproj/project.pbxproj index 765f0d8..c043d8b 100644 --- a/TabletDemo/TabletDemo.xcodeproj/project.pbxproj +++ b/TabletDemo/TabletDemo.xcodeproj/project.pbxproj @@ -18,6 +18,7 @@ DAB7EB351BEF787300D2AD5E /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DAB7EB331BEF787300D2AD5E /* LaunchScreen.storyboard */; }; DAB7EB3E1BEF78A400D2AD5E /* Tablet.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAB7EB3D1BEF78A400D2AD5E /* Tablet.swift */; }; DAB7EB401BEFD07E00D2AD5E /* ConfigurableTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAB7EB3F1BEFD07E00D2AD5E /* ConfigurableTableViewCell.swift */; }; + DAED08F11C14DE7E006C04D8 /* MyTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAED08F01C14DE7E006C04D8 /* MyTableViewCell.swift */; }; DAF003961C14DC0C0028C3D6 /* MyNibTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAF003951C14DC0C0028C3D6 /* MyNibTableViewCell.swift */; }; DAF003981C14DC250028C3D6 /* MyNibTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = DAF003971C14DC250028C3D6 /* MyNibTableViewCell.xib */; }; /* End PBXBuildFile section */ @@ -36,6 +37,7 @@ DAB7EB361BEF787300D2AD5E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; DAB7EB3D1BEF78A400D2AD5E /* Tablet.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Tablet.swift; sourceTree = ""; }; DAB7EB3F1BEFD07E00D2AD5E /* ConfigurableTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ConfigurableTableViewCell.swift; sourceTree = ""; }; + DAED08F01C14DE7E006C04D8 /* MyTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MyTableViewCell.swift; sourceTree = ""; }; DAF003951C14DC0C0028C3D6 /* MyNibTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MyNibTableViewCell.swift; sourceTree = ""; }; DAF003971C14DC250028C3D6 /* MyNibTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MyNibTableViewCell.xib; sourceTree = ""; }; /* End PBXFileReference section */ @@ -77,6 +79,7 @@ DA1BCD101BF7388C00CC0479 /* CustomTableActions.swift */, DAF003951C14DC0C0028C3D6 /* MyNibTableViewCell.swift */, DAF003971C14DC250028C3D6 /* MyNibTableViewCell.xib */, + DAED08F01C14DE7E006C04D8 /* MyTableViewCell.swift */, DAB7EB2E1BEF787300D2AD5E /* Main.storyboard */, DAB7EB311BEF787300D2AD5E /* Assets.xcassets */, DAB7EB331BEF787300D2AD5E /* LaunchScreen.storyboard */, @@ -172,6 +175,7 @@ 508B71841BF48DD300272920 /* TableSectionBuilder.swift in Sources */, DAB7EB2D1BEF787300D2AD5E /* ViewController.swift in Sources */, DAB7EB3E1BEF78A400D2AD5E /* Tablet.swift in Sources */, + DAED08F11C14DE7E006C04D8 /* MyTableViewCell.swift in Sources */, DAF003961C14DC0C0028C3D6 /* MyNibTableViewCell.swift in Sources */, 508B71861BF48E0D00272920 /* TableRowBuilder.swift in Sources */, DA1BCD0F1BF5472C00CC0479 /* TableDirector.swift in Sources */, diff --git a/TabletDemo/TabletDemo.xcodeproj/project.xcworkspace/xcuserdata/maxsokolov.xcuserdatad/UserInterfaceState.xcuserstate b/TabletDemo/TabletDemo.xcodeproj/project.xcworkspace/xcuserdata/maxsokolov.xcuserdatad/UserInterfaceState.xcuserstate index 0324db2..84ce3d2 100644 Binary files a/TabletDemo/TabletDemo.xcodeproj/project.xcworkspace/xcuserdata/maxsokolov.xcuserdatad/UserInterfaceState.xcuserstate and b/TabletDemo/TabletDemo.xcodeproj/project.xcworkspace/xcuserdata/maxsokolov.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/TabletDemo/TabletDemo/MyTableViewCell.swift b/TabletDemo/TabletDemo/MyTableViewCell.swift new file mode 100644 index 0000000..9f03cea --- /dev/null +++ b/TabletDemo/TabletDemo/MyTableViewCell.swift @@ -0,0 +1,19 @@ +// +// MyTableViewCell.swift +// TabletDemo +// +// Created by Max Sokolov on 07/12/15. +// Copyright © 2015 Tablet. All rights reserved. +// + +import Foundation +import UIKit + +class MyTableViewCell : UITableViewCell { + + override func layoutSubviews() { + super.layoutSubviews() + + backgroundColor = UIColor.redColor() + } +} \ No newline at end of file diff --git a/TabletDemo/TabletDemo/ViewController.swift b/TabletDemo/TabletDemo/ViewController.swift index 0a7a835..5260cd0 100644 --- a/TabletDemo/TabletDemo/ViewController.swift +++ b/TabletDemo/TabletDemo/ViewController.swift @@ -53,10 +53,12 @@ class ViewController: UIViewController { data.cell!.contentLabel.text = "Tablet is a super lightweight yet powerful generic library that handles a complexity of UITableView's datasource and delegate methods in a Swift environment. Tablet's goal is to provide an easiest way to create complex table views. With Tablet you don't have to write a messy code of switch or if statements when you deal with bunch of different cells in different sections." } - let sectionBuilder = TableSectionBuilder(headerTitle: "Tablet", footerTitle: "Deal with table view like a boss.", rowBuilders: [rowBuilder, configurableRowBuilder]) + let myRowBuilder = TableRowBuilder(item: 0, id: "cellll") + + let sectionBuilder = TableSectionBuilder(headerTitle: "Tablet", footerTitle: "Deal with table view like a boss.", rowBuilders: [rowBuilder, configurableRowBuilder, myRowBuilder]) tableDirector += sectionBuilder - + sectionBuilder.appendRowBuilder(TableRowBuilder(item: 0)) } } \ No newline at end of file