开发者

Problem with empty sections in UITableView

开发者 https://www.devze.com 2023-01-11 08:47 出处:网络
I am trying to display the data on the UITableIndexed View and I deleted the empty sections in the table.Now the problem is I added a gradient image as the background to the UITableView, it displays f

I am trying to display the data on the UITableIndexed View and I deleted the empty sections in the table.Now the problem is I added a gradient image as the background to the UITableView, it displays fine for all the cells, but when there is an empty 开发者_Go百科section it displays a row with white color with which the appearance of the table view is not appealing. How I can permanently delete the empty sections from the table??

Also can anyone please tell me how to display only the indexes which have the sections.

I will be waiting for your reply. I am a newbie in iphone programming, I think it might sound silly to ask but I want to learn from the advices from you.


For the empty cell

  1. Set the background of the TableView to clearColor

  2. Set the separator color to clear color

This will do


Also can anyone please tell me how to display only the indexes which have the sections.

When you produce the array that will be shown as the indexes, you need to go through your sections and only put the ones that have data on that array. There's no automatic way to do it.

0

精彩评论

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