Skip to content
This repository has been archived by the owner on Nov 5, 2020. It is now read-only.

Commit

Permalink
Updating README.
Browse files Browse the repository at this point in the history
  • Loading branch information
okhanokbay committed Jun 22, 2017
1 parent 272ef4c commit 754debd
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,18 @@ class ViewController: ExpyTableViewDataSource {

@IBOutlet weak var expandableTableView: ExpyTableView!

// First, set data source for your table view.
override func viewDidLoad() {
super.viewDidLoad()
expandableTableView.dataSource = self
//Set delegate if you will implement any UITableViewDelegate or ExpyTableViewDelegate methods.
//expandableTableView.delegate = self
}

// Then return your expandable cell instance from expandingCell data source method.
func expandableCell(forSection section: Int, inTableView tableView: ExpyTableView) -> UITableViewCell {
// This cell will be displayed at IndexPath with (section: section and row: 0)
}
// First, set data source for your table view.
override func viewDidLoad() {
super.viewDidLoad()
expandableTableView.dataSource = self
//Set delegate if you will implement any UITableViewDelegate or ExpyTableViewDelegate methods.
//expandableTableView.delegate = self
}

// Then return your expandable cell instance from expandingCell data source method.
func expandableCell(forSection section: Int, inTableView tableView: ExpyTableView) -> UITableViewCell {
// This cell will be displayed at IndexPath with (section: section and row: 0)
}
}
```

Expand All @@ -64,9 +64,9 @@ If you want, you can improve the implementation:
```swift
extension ViewController {
//OPTIONAL DATA SOURCE METHOD, default is true for all sections.
func canExpand(section: Int, inTableView tableView: ExpyTableView) -> Bool {
return true //Return false if you want your section not to be expandable
}
func canExpand(section: Int, inTableView tableView: ExpyTableView) -> Bool {
return true //Return false if you want your section not to be expandable
}
}
```

Expand Down

0 comments on commit 754debd

Please sign in to comment.