开发者

Can use image for sectionIndexTitlesForTableView?

Have you noticed that in the iPod app, for the sectionIndex, the first one is a little "Magnifier", it's so cute! But when we are implementing sectionIndexTitlesForTableView: method, we have been told that it need to return a N开发者_JAVA百科SArray with NSString inside, so, how to make it as icon? Maybe apple define some special replacement if we offer some particular char, anyone has idea about this?


The magnifying glass icon is achieved by making the first entry in your section index title array the value UITableViewIndexSearch.

Then you have to remember that index 0 means the user wants to use the search interface. Put another way, when using UITableViewIndexSearch in your index titles, you have to remember that your first real index title is at index 1, not 0.

You are correct that the section index title array is an array of NSString's. You cannot provide other images there. (That'd be cool if you could, but there is no mechanism for that at this point.)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜