iphone - Pass a UImage to a UIImageView -


i trying pass image loaded uiimage instance uiimageview in detailviewcontroller. can see getting pulling image path successfully, , accessing .gif file seen in nslogs () :

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: <uiimage: 0x4e44a80> 

i uncertain on how pass image mapdetailsviewcontroller in following method?

- (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;   } 

i know doing horribly wrong in line :

mapdetailsviewcontroller.selectedimageview.image = detailmap; 

since error when build:

request member 'image' in not structure or union 

mapdetailsviewcontroller.selectedimageview should dvcontroller.selectedimageview.image = detailmap;.


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -