Cambiar el "botón" Cargar más en tres20 TTThumbsViewController?

How can i change the custom three20 Load More footer in a TTThumbsViewController ?

preguntado el 08 de noviembre de 11 a las 11:11

1 Respuestas

TTThumbsViewController is a fancy TTTableViewController which means he is using a TTDataSource. The best way on it is inheriting from TTThumbsViewController and Overriding this message (this is the one that TTThumbsViewController is using) :

- (id<TTTableViewDataSource>)createDataSource {
  return [[[TTThumbsDataSource alloc] initWithPhotoSource:_photoSource delegate:self] autorelease];

Then implement a datasource that inherits from TTThumbsDataSource and override this message like this:

- (Class)tableView:(UITableView*)tableView cellClassForObject:(id)object {
    if ([object isKindOfClass:[TTTableMoreButton class]]) {
        return [YOU_CLASS class];
    } else {
        return [super tableView:tableView cellClassForObject:object];

What happens behind the scenes is that the datasources decides if there are more images to load, if so it adds a TTTableMoreButton item to the list of items needed to be shown. By giving it your own cell class you can completely override the look and feel of that cell.

respondido 20 nov., 11:12

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.