2010-08-10 167 views
0

我有一个UITableViewController,并且我已经指定了索引标题,以便用户可以跳到特定的字母,就像iPhone上的iPod应用程序(特别是歌曲列表)。我已经设置了一切,并在UITableViewProtocol中实现了所有的方法。UITableView无法正常工作。为什么?

现在,这是问题所在。当我点击右侧的索引(它们是字母)时,表格无法正确更新。它的顶部会更新我点击的标题,但实际的行不会。为什么会发生这种情况?我需要检查什么方法?我发现奇怪的是,行内容的标题更改保持不变。

谢谢!

+2

您需要包括一些示例代码,我们可以看到你在做什么 – Jason 2010-08-10 18:33:56

回答

1

你是否将数据源设置为二维数组?右侧的索引将按外部索引排序。

查看苹果有关如何填充索引表的说明。如果你遵循他们的代码示例,你应该能够得到它的工作。

http://developer.apple.com/iphone/library/documentation/userexperience/conceptual/TableView_iPhone/CreateConfigureTableView/CreateConfigureTableView.html

+0

+1 http://developer.apple.com/iphone/library/documentation/userexperience/conceptual/TableView_iPhone/CreateConfigureTableView /CreateConfigureTableView.html#//apple_ref/doc/uid/TP40007451-CH6-SW30 – 2010-08-10 21:28:55

相关问题