You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+23-34Lines changed: 23 additions & 34 deletions
Original file line number
Diff line number
Diff line change
@@ -10,55 +10,44 @@ Thunder table comprises of two main types of objects:
10
10
11
11
### Rows
12
12
13
-
Table rows are objects that conform to the `TSCTableRowDataSource` protocol, this protocol has properties such as: title, subtitle and image which are responsible for providing the content to a table view cell. As this is a protocol any object can conform to it, which allows you to simply send an array of model objects to the table view to display your content.
13
+
Table rows are objects that conform to the `Row` protocol, this protocol has properties such as: title, subtitle and image which are responsible for providing the content to a table view cell. As this is a protocol any object can conform to it, which allows you to simply send an array of model objects to the table view to display your content.
14
14
15
15
### Sections
16
16
17
-
Table sections are objects that conform to the `TSCTableSectionDataSource` protocol, most of the time you won't need to implement this protocol yourself as Thunder Table has a convenience class TSCTableSection which can be used in most circumstances. However you can implement more complex layouts using this protocol on your own classes.
18
-
19
-
## Dynamic Cell Heights
20
-
21
-
Yes. You heard it here first. Thunder Table has an automatic cell height calculation system, so there's no need for constraints auto layout or calculating the height of your text manually.
22
-
23
-
Cell height is calculated automatically, but if you do wisth to override it you can do so using methods in the `TSCTableSectionDataSource` protocol.
17
+
Table sections are objects that conform to the `Section` protocol, most of the time you won't need to implement this protocol yourself as Thunder Table has a convenience class `TableSection` which can be used in most circumstances. However you can implement more complex layouts using this protocol on your own classes.
24
18
25
19
# Installation
26
20
27
-
Setting up your app to use Thunder Table is a simple and quick process. For now Thunder Table is built as a static framework, meaning you will need to include the whole Xcode project in your workspace.
21
+
Setting up your app to use Thunder Table is a simple.
28
22
29
-
+ Drag all included files and folders to a location within your existing project.
23
+
+ Drag ThunderTable.xcodeproj
30
24
+ Add ThunderTable.framework to your Embedded Binaries.
31
-
+ Wherever you want to use ThunderTable use `@import ThunderTable` or `import ThunderTable` if you're using swift.
25
+
+ Wherever you want to use ThunderTable use `import ThunderTable`
32
26
33
27
# Code Example
34
28
## A Simple Table View Controller
35
29
36
-
Setting up a table view is massively simplified using thunder table, in fact, we can get a simple table view running with just a few lines of code. To create a custom table view we subclass from TSCTableViewController, in the initalizer we determine which tableView style we want by calling the correct `[super init]` method like so:
37
-
38
-
- (id)init
39
-
{
40
-
if (self = [super initWithStyle:UITableViewStyleGrouped]) {
41
-
42
-
// Handle any custom initialisation here.
43
-
}
44
-
return self;
45
-
}
30
+
Setting up a table view is massively simplified using thunder table, in fact, we can get a simple table view running with just a few lines of code. To create a custom table view we subclass from `TableViewController`. We then set up our table in the `viewDidLoad:` method. Below is the full code for a table view that displays one row, with text, a subtitle, image and handles table selection by pushing another view.
46
31
47
-
We then set up our table in the `viewDidLoad:` method. First we initialise the rows which we want to appear in our table view:
Documentation is available for the entire library in AppleDoc format. This is available in the framework itself or in the [Hosted Version](http://3sidedcube.github.io/iOS-ThunderTable/)
0 commit comments