Database Reference
In-Depth Information
Next, scroll down to didSelectRowAtIndexPath . You're going to add three more
cases to the switch statement you added earlier:
override func tableView(tableView: UITableView ,
didSelectRowAtIndexPath indexPath: NSIndexPath ) {
let cell = tableView. cellForRowAtIndexPath (indexPath)!
switch cell {
// Price section
case cheapVenueCell :
selectedPredicate = cheapVenuePredicate
case moderateVenueCell :
selectedPredicate = moderateVenuePredicate
case expensiveVenueCell :
selectedPredicate = expensiveVenuePredicate
//Most Popular section
case offeringDealCell :
selectedPredicate = offeringDealPredicate
case walkingDistanceCell :
selectedPredicate = walkingDistancePredicate
case userTipsCell :
selectedPredicate = hasUserTipsPredicate
default :
println ( "default case" )
}
cell. accessoryType = . Checkmark
}
Above, you added cases for offeringDealCell , walkingDistanceCell and
userTipsCell . These are the three new filters for which you're now adding support.
That's all you need to do. Build and run the sample app. Go to the filters page,
select the Offering Deals filter and tap Search :
Search WWH ::




Custom Search