import ZestySwiftContentEndpointWrapper
class ViewController: UIViewController, UITableViewDataSource, UITableViewDelegate {
@IBOutlet weak var tableView: UITableView!
var zesty: ZestySwiftContentEndpointWrapper!
var items: [[String: String]] = []
override func viewDidLoad() {
// Do any additional setup after loading the view, typically from a nib.
self.zesty = ZestySwiftContentEndpointWrapper(url: "REPLACE WITH ZESTY PREVIEW DOMAIN")
/// Call this function whenever you want to look for new data
self.zesty.getArray(for: "REPLACE WITH ARRAY ZUID") { (array, error) in
self.tableView.reloadData()
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let item = self.items[indexPath.row]
let cell = UITableViewCell(style: .subtitle, reuseIdentifier: "SubtitleCell")
cell.textLabel?.text = item["name"]
cell.detailTextLabel?.text = item["description"]