Estoy tratando de utilizar la llamada AFNetworking UIImageView cargar imágenes desde una URL como se muestra a continuación:imagen de marcador AFNetworking + UIImageView aparece, pero no URL de la imagen
[self.image setImageWithURL:[NSURL URLWithString:feed.imageURL] placeholderImage: [UIImage imageNamed:@"logo"]];
La imagen de marcador de posición aparece siempre, pero la imagen real de "feed.imageURL" nunca lo hace. Verifiqué que la URL es realmente correcta. Incluso lo codifiqué para asegurarme, y todavía nada.
Mi configuración básica de la aplicación es un controlador de pestañas ... y en viewDidLoad, invoco un método "fetchFeed" que realiza la solicitud HTTP para recopilar mis datos JSON.
Mi bloque de solicitud de aspecto:
AFJSONRequestOperation *operation = [AFJSONRequestOperation
JSONRequestOperationWithRequest:request
success:^(NSURLRequest *request, NSHTTPURLResponse *response, id JSON) {
[self parseDictionary:JSON];
isLoading = NO;
[self.tableView reloadData];
} failure:^(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, id JSON) {
NSLog(@"Error: %@", error);
[self showNetworkError];
isLoading = NO;
[self.tableView reloadData];
}];
operation.acceptableContentTypes = [NSSet setWithObjects:@"application/json", @"text/json", @"text/javascript", @"text/html", nil];
[queue addOperation:operation];
Son sus imágenes dentro de UITableViewCells? ¿Estás llamando 'setImageWithURL' en tu método de delegado' cellForRowAtIndexPath: '? – jonkroll
Sí, a ambas preguntas. –
¿Podría incluir el código que usa para configurar las imágenes remotas, en 'tableView: cellForRowAtIndexPath:'? – mattt