// Tratamento de eventos: caso d'utilisation clique nombre de boutons de tableau Bonjour encore les gars, J'essayais d'afficher un UIAlertView pour montrer le résumé d'un objet 'Movie' que j'ai stocké et mon idée était de montrer deux boutons si j'avais le site web du film stocké, ou juste pour en montrer un si le film n'en avait pas.UIAlert comportement erroné
Assez bizarrement, je ne reçois pas un, pas deux, mais 3 très différents UIAlertViews!
alt text http://i41.tinypic.com/2vc9hg9.jpg
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
NSString *ShinraTensei = (@"%@ \n", [[array_resultados objectAtIndex:indexPath.row] Sumario]);
if([[array_resultados objectAtIndex:indexPath.row] WebSite] != nil)
{
// NSLog(@"Nulo");
UIAlertView* myAlertView = [[UIAlertView alloc] initWithTitle:[[array_resultados objectAtIndex:indexPath.row] TituloFilme] message:ShinraTensei delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
CGAffineTransform myTransform = CGAffineTransformMakeTranslation(0.0, 0.0);
[myAlertView setTransform:myTransform];
[myAlertView show];
[myAlertView release];
myAlertView = nil;
}
else
{
UIAlertView* myAlertView2 = [[UIAlertView alloc] initWithTitle:[[array_resultados objectAtIndex:indexPath.row] TituloFilme] message:ShinraTensei delegate:self cancelButtonTitle:@"LOL" otherButtonTitles:nil];
CGAffineTransform myTransform2 = CGAffineTransformMakeTranslation(0.0, 0.0);
[myAlertView2 setTransform:myTransform2];
[myAlertView2 show];
[myAlertView2 release];
myAlertView = nil;
}
}
EDIT: Si vous ne pouvez pas voir l'image embeded dans ce poste, s'il vous plaît visitez: http://i41.tinypic.com/2vc9hg9.jpg
Hal, légal ver outro brasileiro fazendo iphone apps! – jpm