Gradually learning to like mono touch
Is there an equivalent to the FindName function so i can manipulate a control from its "string" name
UIKit controls (views) don't have names, but they do have tags, which are integer values
You can find a control/subview by calling ViewWithTag():
UIView subview = new UIView(..);
subview.Tag = 100;
parentView.AddSubview(subView);
In another method:
UIView subView = parentView.ViewWithTag(100);
In addition to the tag as suggested by Philippe, what you can do is create an "Outlet" in your class that references the control, which will give you the equivalent of referencing it by name.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With