diff --git a/ParseUIDemo/Swift/CustomViewControllers/ProductTableViewController/CustomProductTableViewController.swift b/ParseUIDemo/Swift/CustomViewControllers/ProductTableViewController/CustomProductTableViewController.swift index 30944cc..ed42217 100644 --- a/ParseUIDemo/Swift/CustomViewControllers/ProductTableViewController/CustomProductTableViewController.swift +++ b/ParseUIDemo/Swift/CustomViewControllers/ProductTableViewController/CustomProductTableViewController.swift @@ -27,14 +27,13 @@ import ParseUI class CustomProductTableViewController: PFProductTableViewController { override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) { - let product = objects?[indexPath.row] as? PFObject + let product = objects?[indexPath.row] if let identifier = product?["productIdentifier"] as? String where identifier == "Cooper" { PFPurchase.buyProduct(identifier) { error in if error == nil { UIAlertView(title: "Success!", message: "Yes!", delegate: nil, cancelButtonTitle: "OK").show() } } - return } super.tableView(tableView, didSelectRowAtIndexPath: indexPath) } diff --git a/ParseUIDemo/Swift/CustomViewControllers/QueryTableViewController/SectionedTableViewController.swift b/ParseUIDemo/Swift/CustomViewControllers/QueryTableViewController/SectionedTableViewController.swift index e90fcb0..ea20558 100644 --- a/ParseUIDemo/Swift/CustomViewControllers/QueryTableViewController/SectionedTableViewController.swift +++ b/ParseUIDemo/Swift/CustomViewControllers/QueryTableViewController/SectionedTableViewController.swift @@ -44,7 +44,7 @@ class SectionedTableViewController: PFQueryTableViewController { super.objectsDidLoad(error) sections.removeAll(keepCapacity: false) - if let objects = objects as? [PFObject] { + if let objects = objects { for object in objects { let priority = (object["priority"] as? Int) ?? 0 var array = sections[priority] ?? Array()