ios - NSPredicate in Swift, array of custom objects returning [CustomArray] does not have a member named 'filteredArrayUsingPredicate" -


i have function filters array based on dates. send function array called spending data. array of custom objects containing user's spending data (time, amount, etc). getting error "[spendingdata] not have member named 'filteredarrayusingpredicate'. doesn't make sense me, array. appreciated. can around sending function type of nsarray , returning nsarray, causes kinds of errors when try use new array (datatoview) in tableview.

 func predicatestuff(spendingdataall:[spendingdata])->[spendingdata]{          //send in current array of spending data datamodel.spendingdatadisplay (array)         let searchpredicate = nspredicate(format: "datespent >= %@ && datespent< %@",weekstart!,weekend!)         var datatoview = spendingdataall.filteredarrayusingpredicate(searchpredicate!)         return datatoview     } 


Comments

Popular posts from this blog

cakephp - simple blog with croogo -

How to group boxplot outliers in gnuplot -

bash - Performing variable substitution in a string -