Note that there are some explanatory texts on larger screens.

plurals
  1. POPass a UImage to a UIImageView
    primarykey
    data
    text
    <p>I am trying to pass an image loaded from a UIImage instance to a UIImageView in a DetailViewController. I can see I am getting pulling he image path successfully, and accessing the .gif file as seen in my NSLogs () :</p> <pre><code>2011-02-09 10:52:13.404 WorldGovernments[31443:207] pathToMap = af-map.gif 2011-02-09 10:52:13.406 WorldGovernments[31443:207] detail map is: &lt;UIImage: 0x4e44a80&gt; </code></pre> <p>I am uncertain on how to pass this image to <code>MapDetailsViewController</code> in the following method?</p> <pre><code>- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { MapDetailsViewController *dvController = [[MapDetailsViewController alloc] initWithNibName:@"MapDetailsView" bundle:[NSBundle mainBundle]]; NSDictionary* tempDict=[sortedCountries objectAtIndex:indexPath.row]; NSString *pathToMap = [tempDict objectForKey:@"map"]; NSLog(@"pathToMap = %@",pathToMap); UIImage *detailMap = [UIImage imageNamed:pathToMap]; NSLog(@"detail map is: %@",detailMap); MapDetailsViewController.selectedImageView.image = detailMap; [self.navigationController pushViewController:dvController animated:YES]; [dvController release]; //dvController = nil; } </code></pre> <p>I know I am doing something horribly wrong in this line :</p> <pre><code>MapDetailsViewController.selectedImageView.image = detailMap; </code></pre> <p>Since I get this error when I build: </p> <pre><code>Request for member 'image' in something not a structure or union </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload