jubinjacob19 / ExpandableTableView

A tableview with expandable cells which can be used for controls like FAQ
40 stars 9 forks source link

Carthage compatible

ExpandableTableView

Generic View Controller which can be used to show expandable sections in apps like FAQs. Accepts json data in the form [{"Question":"Question 1","Answer":"Answer 1"] and loads it in tableview with expandable/collapsible cells

Installation with Carthage

To integrate ExpandableTableView into your Xcode project using Carthage, specify it in your Cartfile:

github "jubinjacob19/ExpandableTableView"

Usage

Initialize ExpandableTableViewController with an array of ItemModel objects

let faqs : [ItemModel] = // fetch ItemModel from your app
let expandableTableVC = ExpandableTableViewController(faqs: fetchQuestions())

Creating Item model

let item = ItemModel(question: "question", answer: "answer")