У меня есть ссылка на картинку и мне нужно показать эту картинку во весь экран iphone. У меня так :
NSString *url = [[self.parseResults objectAtIndex:indexPath.row] objectForKey:@"link"];
NSString *title = [[self.parseResults objectAtIndex:indexPath.row] objectForKey:@"title"];
WebViewController *vc = [[WebViewController alloc] initWithURL:url title:title];
[self.navigationController pushViewController:vc animated:YES];
Но такой вариант не подходит. В общем, нужно просто отобразить картинку в экране, зная ссылку на нее ( url ). Подскажите, пожалуйста.
Сделал так:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
// NSString *url = [[self.parseResults objectAtIndex:indexPath.row] objectForKey:@"link"];
//NSString *title = [[self.parseResults objectAtIndex:indexPath.row] objectForKey:@"title"];
//WebViewController *vc = [[WebViewController alloc] initWithURL:url title:title];
//[self.navigationController pushViewController:vc animated:YES];
NSData *imageData = [NSData dataWithContentsOfURL:[NSURL URLWithString:@"http://hashcode.ru/upfiles/logo.png"]];
UIImageView *ourImageView = [[UIImageView alloc] initWithImage:[UIImage imageWithData:imageData]];
[ourImageView setFrame:[[UIScreen mainScreen] bounds]];
UIViewController *controller = [[UIViewController alloc] init];
[controller setView:ourImageView];
[self.navigationController pushViewController:controller animated:YES];
}
Но почему то ничего не происходит...