[MonoTouch] Access a property of an outlet in a new method
Salmo Junior
salmo at chb.com.br
Tue Dec 13 13:12:37 EST 2011
Hello,
I'm having trouble getting access a property of an
outlet in a new method, for example:
public partial class ViewApresentacao : UIViewController
{
...
...
public override void ViewDidLoad ()
{
base.ViewDidLoad ();
//my ImageView
imgModelo.Image = UIImage.FromBundle ("Image/car.png");
}
public void ImagemModelo(string caminho)
{
imgModelo.Image = UIImage.FromBundle (caminho);
}
....
}
At viewDidLoad functions normally, but the second did not,
wanted to use it to update when a selected
row in a table, it's all working but when I call the method of
the error "object reference not set to an
instance of an object", can someone help me?
Sorry if I was not very clear, I'm from Brazil and I'm
using google translate!
Hugs
More information about the MonoTouch
mailing list