When we read an article, it must be a long time to forget, then we need to search for this function, search for the text we read at that time, with the most search is probably I use the Address book,
Since out, has been thinking, the right top of the search button is how to add, has been thinking, most want more or a picture, can only be a picture, if it is a picture, that can only be customized to the right, so this method is sure to be able, there is a situation, is the way to have this picture.
-(Nsarray *) Sectionindextitlesfortableview: (UITableView *) tableview{return @[@ "{search}"]; equivalent to [arr addobject:uitableviewindexsearch];}
The API gives such an explanation
Uikit_extern nsstring *const uitableviewindexsearch ns_available_ios (3_0) __tvos_prohibited;
Including this constant string in the array of strings returned by Sectionindextitlesfortableview:will cause a magnifying Glass icon to is displayed at the-location in the index.
This should generally is used as the first title in the index.
This article is from the "snowflakes flying over the World" blog, please be sure to keep this source http://smengxiang.blog.51cto.com/11204872/1861306
IOS UITableView form search function, search button on the right