Loading a view with a UIImage
Hi,
I am trying to push a new view by the following sudocode:
var vc = new viewName("image.png");
NavigationViewController.push(vc);
the view loads fine, if I ignore the next lines:
public override void ViewDidLoad ()
{
UIImage cIm = UIImage.FromFile(string.Format(@"images\{0}", imageName));
view.Image = cIm;
}
if I leave these lines I get an Object Reference not set to an instance of an object on the view.Image = cIm; line...
I've created an UIImageView and set an outlet for it. But I cannot see how to set the image to that, that is passed into creating the view before pushing it onto the controller.
All help gratefully received.
Scott
|