i have a barcode scanning app, and i have an image view showing the picture of the recently scanned item, through a web service. it worked in the beginning, but after i changed something a while back it stopped showing up. now I'm trying to fix this problem. in only appears when i go out of the view controller (via tab bar) and go back in, here is my viewWillAppear code:
Code:
- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
// use the product code for image, even if UPC is scanned
NSString *sURL = [[NSString alloc] initWithString:[NSString stringWithFormat:@"http://******.*****.com:90/prodimage/%@.jpg", displayText.text]];
NSData *mydata = [[NSData alloc] initWithContentsOfURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@",sURL]]];
UIImage *image = [[UIImage alloc] initWithData:mydata];
[invenImage setImage:image];
}