I have an array with three values in it:
name
description
imgLoc
imgLoc is the URL of an image file which will be loaded in an UIImageView (within another view) when the user selects it from a table.
I'm having no problems passing the description value from the table view controller to the view which contains the images, but I cannot get the image URL to pass from one to the other.
In my table view controller .m file I have this for the description:
The variable is then passed to the second file successfully and outputs using:
UITextView is great, because it has the "setText" part. But the URL of the image has to be manipulated to make UIImageView display it.
So what I was doing is this in the table file:
With an NSString called shotLoc defined and synthesised in shotView using this code:
But it doesn't work. The application just crashes when it comes time to load the view containing the image. I'm completely stumped and any help people could give would be very much appreciated!
name
description
imgLoc
imgLoc is the URL of an image file which will be loaded in an UIImageView (within another view) when the user selects it from a table.
I'm having no problems passing the description value from the table view controller to the view which contains the images, but I cannot get the image URL to pass from one to the other.
In my table view controller .m file I have this for the description:
Code:
[self.shotView.shotDescription setText:[shots description]];
The variable is then passed to the second file successfully and outputs using:
Code:
IBOutlet UITextView *shotDescription;
UITextView is great, because it has the "setText" part. But the URL of the image has to be manipulated to make UIImageView display it.
So what I was doing is this in the table file:
Code:
self.shotView.shotLoc = [shots imgloc];
With an NSString called shotLoc defined and synthesised in shotView using this code:
Code:
NSString *shotLoc;
@property(nonatomic,retain) NSString *shotLoc;
But it doesn't work. The application just crashes when it comes time to load the view containing the image. I'm completely stumped and any help people could give would be very much appreciated!