monsabre
monsabre

Reputation: 2099

Add TTThumbsViewController to a ViewController

I tried to use the codes below to add a TTThumbsViewController to a ViewController

#import <Three20/Three20.h>

@interface PhotoTestController : TTThumbsViewController {
}

@end

@implementation PhotoTestController

- (void)viewDidLoad {

 }

@end

//---------------------------------------------------------------

//in my ViewController.m

- (void)viewDidLoad
 {

   PhotoTestController *vPhotoTestController=[[PhotoTest2Controller alloc] init  ];
   [vPhotoTest2Controller setDelegate:self];
   [self.view addSubview:vPhotoTestController.view ];
 }

on the view of ViewController, there is no UI for TTThumbsViewController/PhotoTestController display and only show a full screen white window, I am not sure what is wrong?

Welcome any comment

Thanks

Upvotes: 1

Views: 389

Answers (1)

BigFwoosh
BigFwoosh

Reputation: 1197

I have been struggling with this as well, but I just discovered that for some reason viewWillAppear was not being called. Once I added [self viewWillAppear:YES] in the viewDidLoad function of my ViewController, the table appeared.

Upvotes: 1

Related Questions