开发者

Three20 : createModel not called

In a class which inherits from TTViewController, I create an UITabBarController :

- (void)loadView
{
    [super loadView];
    YoutubeFeedViewController *y = [[YoutubeFeedViewController alloc] init];
    SourcesController *s = [[Sources开发者_运维知识库Controller alloc] init];
    tabBarController = [[UITabBarController alloc] init];
    tabBarController.viewControllers = [NSArray arrayWithObjects:y, s, nil];
    tabBarController.view.bounds = [[self view] bounds];
    [y release];
    [s release];

    [self.view addSubview:[tabBarController view]];
}

My YoutubeFeedViewController class implements the TTModel protocol to get remote data from Youtube via a TTListDataSource.

I have 2 problems with this code :

  • first : my TabBar is small, about 20 pixels height
  • second : my YoutubeFeedViewController is empty. No data is loaded. After debugging, I noticed that the createModel method is never called, and tableViewDidLoadModel (of my TTListDataSource derived class) is never called too.

When I display it without tabs, all data is loaded.

Do you have an idea ?

Thanks in advance.


did you call [super viewWillAppear:animated] ?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜