IOS UITableView form search function, search button on the right

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.