I'm trying to develop my first app. This is kind of a restaurant and menu app. The first screen should be list of restaurants. This will list all the restaurants from Parse table. If one of the row(restaurant) is selected, it should segue to another view controller, but with chosen(restaurant's/personalized) menu. If any of the menu item is selected, then a third vc should open up with that menu details.
I've created story board design and segues, but not sure: 1) how to present restaurants from parse table into 1st VC ? 2) If selected, how to pass the resta.id from 1st vc to menuVc.
I've tried getting the table data from Parse to an array, but lost in how to pass it to didSelectRow in 1st VC and then to other VC respectively. Is there a way of taking the parse table data into rows for the restaurants table ?
var myRestaurant: [String] = [String]()
//Getting the data from the PFQuery class
var query = PFQuery(className: "Restaurants")
query.findObjectsInBackgroundWithBlock{
(objects: [AnyObject]?, error: NSError?) -> Void in
if error == nil {
if let objects = objects as? [PFObject] {
for object in objects {
self.myRestaurant.append(object.objectForKey("ClassNameObject") as! String)
}
}
} else {
println("errorin fetching restaurant block")
}
}