methods improvements
This commit is contained in:
parent
dd97d7a279
commit
9c909b8471
|
|
@ -1,6 +1,6 @@
|
|||
Pod::Spec.new do |s|
|
||||
s.name = 'Tablet'
|
||||
s.version = '0.4.0'
|
||||
s.version = '0.4.1'
|
||||
|
||||
s.homepage = 'https://github.com/maxsokolov/tablet'
|
||||
s.summary = 'Powerful type-safe tool for UITableView. Swift 2.0 is required.'
|
||||
|
|
|
|||
BIN
Tablet.xcworkspace/xcuserdata/max.xcuserdatad/UserInterfaceState.xcuserstate
generated
Normal file
BIN
Tablet.xcworkspace/xcuserdata/max.xcuserdatad/UserInterfaceState.xcuserstate
generated
Normal file
Binary file not shown.
|
|
@ -192,33 +192,33 @@ public extension TableDirector {
|
|||
|
||||
// MARK: Sections manipulation
|
||||
|
||||
public func appendSection(section: TableSectionBuilder) {
|
||||
appendSections([section])
|
||||
public func append(section section: TableSectionBuilder) {
|
||||
append(sections: [section])
|
||||
}
|
||||
|
||||
public func appendSections(sections: [TableSectionBuilder]) {
|
||||
public func append(sections sections: [TableSectionBuilder]) {
|
||||
|
||||
sections.forEach { $0.willMoveToDirector(tableView) }
|
||||
self.sections.appendContentsOf(sections)
|
||||
}
|
||||
|
||||
public func clearSections() {
|
||||
public func clear() {
|
||||
sections.removeAll()
|
||||
}
|
||||
}
|
||||
|
||||
public func +=(left: TableDirector, right: RowBuilder) {
|
||||
left.appendSection(TableSectionBuilder(rows: [right]))
|
||||
left.append(section: TableSectionBuilder(rows: [right]))
|
||||
}
|
||||
|
||||
public func +=(left: TableDirector, right: [RowBuilder]) {
|
||||
left.appendSection(TableSectionBuilder(rows: right))
|
||||
left.append(section: TableSectionBuilder(rows: right))
|
||||
}
|
||||
|
||||
public func +=(left: TableDirector, right: TableSectionBuilder) {
|
||||
left.appendSection(right)
|
||||
left.append(section: right)
|
||||
}
|
||||
|
||||
public func +=(left: TableDirector, right: [TableSectionBuilder]) {
|
||||
left.appendSections(right)
|
||||
left.append(sections: right)
|
||||
}
|
||||
|
|
@ -173,7 +173,7 @@ public extension TableRowBuilder {
|
|||
|
||||
// MARK: Items manipulation
|
||||
|
||||
public func appendItems(items: [I]) {
|
||||
public func append(items items: [I]) {
|
||||
self.items.appendContentsOf(items)
|
||||
}
|
||||
|
||||
|
|
@ -183,9 +183,9 @@ public extension TableRowBuilder {
|
|||
}
|
||||
|
||||
public func +=<I, C>(left: TableRowBuilder<I, C>, right: I) {
|
||||
left.appendItems([right])
|
||||
left.append(items: [right])
|
||||
}
|
||||
|
||||
public func +=<I, C>(left: TableRowBuilder<I, C>, right: [I]) {
|
||||
left.appendItems(right)
|
||||
left.append(items: right)
|
||||
}
|
||||
|
|
@ -69,14 +69,14 @@ public class TableSectionBuilder {
|
|||
builders.removeAll()
|
||||
}
|
||||
|
||||
public func appendRow(row: RowBuilder) {
|
||||
appendRows([row])
|
||||
public func append(row row: RowBuilder) {
|
||||
append(rows: [row])
|
||||
}
|
||||
|
||||
public func appendRows(rowBuilders: [RowBuilder]) {
|
||||
public func append(rows rows: [RowBuilder]) {
|
||||
|
||||
if let tableView = tableView { rowBuilders.forEach { $0.registerCell(inTableView: tableView) } }
|
||||
builders.appendContentsOf(rowBuilders)
|
||||
if let tableView = tableView { rows.forEach { $0.registerCell(inTableView: tableView) } }
|
||||
builders.appendContentsOf(rows)
|
||||
}
|
||||
|
||||
// MARK: Internal
|
||||
|
|
@ -102,9 +102,9 @@ public class TableSectionBuilder {
|
|||
}
|
||||
|
||||
public func +=(left: TableSectionBuilder, right: RowBuilder) {
|
||||
left.appendRow(right)
|
||||
left.append(row: right)
|
||||
}
|
||||
|
||||
public func +=(left: TableSectionBuilder, right: [RowBuilder]) {
|
||||
left.appendRows(right)
|
||||
left.append(rows: right)
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>SuppressBuildableAutocreation</key>
|
||||
<dict>
|
||||
<key>DAC2D6681C9D743D009E9C19</key>
|
||||
<dict>
|
||||
<key>primary</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>DAC2D6721C9D743D009E9C19</key>
|
||||
<dict>
|
||||
<key>primary</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
||||
Loading…
Reference in New Issue