diff --git a/Example/Podfile.lock b/Example/Podfile.lock
index bd4fafe..2d8aad2 100644
--- a/Example/Podfile.lock
+++ b/Example/Podfile.lock
@@ -1,5 +1,5 @@
PODS:
- - SwiftDataTables (0.5.0)
+ - SwiftDataTables (0.5.3)
DEPENDENCIES:
- SwiftDataTables (from `../`)
@@ -9,7 +9,7 @@ EXTERNAL SOURCES:
:path: "../"
SPEC CHECKSUMS:
- SwiftDataTables: c6191386bf58e48178f0362170fa7d65439ccaf7
+ SwiftDataTables: 4d8361a5b6abff530e1f186eaa5853c330e28dcf
PODFILE CHECKSUM: 117ac710a88fe801ecac2a925baa29b1107fef2e
diff --git a/Example/Pods/Local Podspecs/SwiftDataTables.podspec.json b/Example/Pods/Local Podspecs/SwiftDataTables.podspec.json
index 69846a9..f810eb5 100644
--- a/Example/Pods/Local Podspecs/SwiftDataTables.podspec.json
+++ b/Example/Pods/Local Podspecs/SwiftDataTables.podspec.json
@@ -1,6 +1,6 @@
{
"name": "SwiftDataTables",
- "version": "0.5.0",
+ "version": "0.5.3",
"summary": "A Swift Data Table package that allows ordering, searching, and paging with extensible options.",
"description": "SwiftDataTables allows you to display grid-like data sets in a nicely formatted table for iOS. The main goal for the end-user are to be able to obtain useful information from the table as quickly as possible with the following features: ordering, searching, and paging; where as for the developer is to allow for easy implementation with extensible options. This package was inspired by Javascript's DataTables package.",
"homepage": "https://github.com/pavankataria/SwiftDataTables",
@@ -13,7 +13,7 @@
},
"source": {
"git": "https://github.com/pavankataria/SwiftDataTables.git",
- "tag": "0.5.0"
+ "tag": "0.5.3"
},
"platforms": {
"ios": "8.0"
diff --git a/Example/Pods/Manifest.lock b/Example/Pods/Manifest.lock
index bd4fafe..2d8aad2 100644
--- a/Example/Pods/Manifest.lock
+++ b/Example/Pods/Manifest.lock
@@ -1,5 +1,5 @@
PODS:
- - SwiftDataTables (0.5.0)
+ - SwiftDataTables (0.5.3)
DEPENDENCIES:
- SwiftDataTables (from `../`)
@@ -9,7 +9,7 @@ EXTERNAL SOURCES:
:path: "../"
SPEC CHECKSUMS:
- SwiftDataTables: c6191386bf58e48178f0362170fa7d65439ccaf7
+ SwiftDataTables: 4d8361a5b6abff530e1f186eaa5853c330e28dcf
PODFILE CHECKSUM: 117ac710a88fe801ecac2a925baa29b1107fef2e
diff --git a/Example/Pods/Target Support Files/SwiftDataTables/Info.plist b/Example/Pods/Target Support Files/SwiftDataTables/Info.plist
index 324eeb2..e475601 100644
--- a/Example/Pods/Target Support Files/SwiftDataTables/Info.plist
+++ b/Example/Pods/Target Support Files/SwiftDataTables/Info.plist
@@ -15,7 +15,7 @@
CFBundlePackageType
FMWK
CFBundleShortVersionString
- 0.5.0
+ 0.5.3
CFBundleSignature
????
CFBundleVersion
diff --git a/SwiftDataTables.podspec b/SwiftDataTables.podspec
index 4ec254d..906a3fc 100644
--- a/SwiftDataTables.podspec
+++ b/SwiftDataTables.podspec
@@ -8,7 +8,7 @@
Pod::Spec.new do |s|
s.name = 'SwiftDataTables'
- s.version = '0.5.2'
+ s.version = '0.5.3'
s.summary = 'A Swift Data Table package that allows ordering, searching, and paging with extensible options.'
# This description is used to generate tags and improve search results.
diff --git a/SwiftDataTables/Classes/SwiftDataTable.swift b/SwiftDataTables/Classes/SwiftDataTable.swift
index 4ebf22e..cac7a2e 100644
--- a/SwiftDataTables/Classes/SwiftDataTable.swift
+++ b/SwiftDataTables/Classes/SwiftDataTable.swift
@@ -192,7 +192,7 @@ public class SwiftDataTable: UIView {
{
self.options = options!
super.init(frame: frame)
- self.set(data: data, headerTitles: headerTitles, options: options)
+ self.set(data: data, headerTitles: headerTitles, options: options, shouldReplaceLayout: true)
self.registerObservers()
@@ -243,12 +243,15 @@ public class SwiftDataTable: UIView {
collectionView.register(UINib(nibName: menuLengthIdentifier, bundle: podBundle), forSupplementaryViewOfKind: SupplementaryViewType.searchHeader.rawValue, withReuseIdentifier: menuLengthIdentifier)
}
- func set(data: DataTableContent, headerTitles: [String], options: DataTableConfiguration? = nil){
+ func set(data: DataTableContent, headerTitles: [String], options: DataTableConfiguration? = nil, shouldReplaceLayout: Bool = false){
self.dataStructure = DataStructureModel(data: data, headerTitles: headerTitles)
self.createDataCellViewModels(with: self.dataStructure)
- self.layout = SwiftDataTableFlowLayout(dataTable: self)
self.calculateColumnWidths()
self.applyOptions(options)
+ if(shouldReplaceLayout){
+ self.layout = SwiftDataTableFlowLayout(dataTable: self)
+ }
+
}
func applyOptions(_ options: DataTableConfiguration?){
@@ -313,9 +316,11 @@ public class SwiftDataTable: UIView {
for index in 0..