I have a tableview inside a view control on a registration screen. When a row is selected in the table, I want to simply close the view that contains the tableview. Something like this:
public override void RowSelected (UITableView tableView, NSIndexPath indexPath)
{
registrationScreen = new RegistrationScreen();
registrationScreen.subView.Hidden = true;
}
I am not sure that I am supposed to be creating a new instance of the registration screen, because the subview is null after I do that and of course it doesn’t work. I think I am missing something really simple, but I am at a loss on how to accomplish. Any help on what I am missing?
I have a lot of problems with encapsulation myself on iOS. I’m always fighting stuff like, how do I access this class from over here inside this one?
A simple way is to pass in the
RegistrationScreento yourUITableViewSource:Pass in the instance of your
RegistrationScreen, then you can accessscreenin yourRowSelected.Is this on the right track with your question?