I have the following code
public string QuestionText
{
get { return txtBox.Text; }
set {txtBox.Text = value; }
}
where txtBox is a UILabel and everytime I try to access it via QuestionText I get a Null Reference Exception. Am I able to set and get the text like this?
Please note that
txtBoxwill be null untilViewDidLoadoccurs.A better solution if you are running into that issue: