I\'m working through the tutorial here (learning Swift) for my first app: http://www.appcoda.com/search-bar-tutorial-ios7/
I\'m stuck on this part (Objective-C code)
You can use filters available in swift to filter content from an array instead of using a predicate like in Objective-C.
An example in Swift 4.0 is as follows:
var stringArray = ["foundation","coredata","coregraphics"]
stringArray = stringArray.filter { $0.contains("core") }
In the above example, since each element in the array is a string you can use the contains method to filter the array.
If the array contains custom objects, then the properties of that object can be used to filter the elements similarly.