简体   繁体   中英

how to pass a criteria specific or filtered datasource to UITableview from another view?

this question might be easy but i'm not sure how to do it.

i will like to show a tableview based on users criteria.

user have a checklist, when checked certain or multiple item, the array will check and inform user there is 3 item matching this criteria.

if user tapped on the button, it will push and show the 3 item in UItableview.

tutorial or sample code are appreciated..

thanks for reading

Load an NSMutableArray with the desired items based on the checklist, but adding items when the user checks something or removing objects when the user unchecks something. Call array.count to get the total number of items. Then pass this array to the UITableView as its data source.

Take an array of selected items,call a method,reload your tableview in this method, match your array data with cell text then increase any variable value. then just make an alert view and show the number of items using that variable.

If further any problem knock me.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM