开发者

Two URL Request for One TTTableViewController

Good Day Mates~

Is it possible in three20 that I will have one TTTableViewController, and the models behin开发者_StackOverflowd the data in the table are different TTURLRequestModels?

...For Example the first row in the table is a data requested from URL "X", and the remaining rows in the table are data requested from another URL which could be URL "Y"

Thanks


I recommend you create a custom TTListDataSource which will combine both URL requests into a single data source. That's probably the easy way to do it.

In your TTTableViewController:

///////////////////////////////////////////////////////////////////////////////////////////////////
- (void)createModel {
  self.dataSource = [[[URLRequestsDataSource alloc]
                     initWithURLs:arrayOfURLs autorelease];
}

In the datasource model class, you can have 2 types of TTTableItem, depending of the source.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜