开发者

How set a TTSectionedDataSource to TTableView, but not using TTTableViewController

开发者 https://www.devze.com 2023-03-18 03:18 出处:网络
I have a view that is not part a TTTableViewController. This could have several TTableViews on it. I try to setup each tableView to its own TTSectionedDataSource, but data is not displayed. I need to

I have a view that is not part a TTTableViewController. This could have several TTableViews on it.

I try to setup each tableView to its own TTSectionedDataSource, but data is not displayed. I need to set the datasource to any of my TableViews on screen, but not depending in that the controller is based on TTTableViewController.

This is what I try first:

self.products.dataSource = [TTSectionedDataSource dataSourceWithObjects:
                   @"Links and Buttons",
                   [TTTableTextItem itemWithText:@"TTTableTextItem" URL:@"tt://tableItemTest"
                                    accessoryURL:@"http://www.google.com"],
                   [TTTableLink itemWithText:@"TTTableLink" URL:@"tt://tableItemTest"],
                   [TTTableButton itemWithText:@"TTTableButton"],
                   [TTTableCaptionItem itemWithText:@"TTTableCaptionItem" caption:@"caption"
             开发者_运维技巧                                   URL:@"tt://tableItemTest"],
                   @"Static Text",
                   [TTTableTextItem itemWithText:@"TTTableTextItem"],
                   [TTTableCaptionItem itemWithText:@"TTTableCaptionItem which wraps to several lines"
                                            caption:@"Text"],
                   [TTTableActivityItem itemWithText:@"TTTableActivityItem"],

                   nil];
0

精彩评论

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