J'essaie d'ajouter un UIWebView en tant que sous-vue d'un UITableViewCell afin d'afficher des données formatées avec le MIMEType "application/xhtml+xml". Le simple fait d'initialiser l'UIWebView comme décrit dans le code suivant entraîne le plantage de l'application !
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
NSLog(@"cellForRowAtIndexPath: '%d' in section '%d'", indexPath.section, indexPath.row);
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = (UITableViewCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
}
UIWebView * webView = [[UIWebView alloc]initWithFrame:cell.frame];
return cell;
}
Je reçois ce message :
bool _WebTryThreadLock(bool), 0x10a7f50 : Tentative d'obtention du verrou web à partir d'un thread autre que le thread principal ou le thread web. Cela peut être le résultat d'un appel à UIKit à partir d'un thread secondaire. Crashing now...<
Je n'arrive pas à comprendre où je me trompe !
Merci de votre aide
Gerald