简体   繁体   中英

Search UITableView without Search Bar

How can you search a UITableView without using the search bar function (ie I want the code to search through and return the answer?) I would like to now at what IndexRow the result sits within the TableView .

I think the answer is UISearchController ...

Thanks

Worked it out:

   [NSIndexPath indexPathForRow:[ObjectsAray indexOfObject:objetc] inSection:0]

This will return the IndexPath of the row of an object from from an Array used to build your TableView if you have 1 section (0)...

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