Getting NSTextField by tag number?

I have a bunch of NSTextFields in the window (labeled 1-8), and I wonder if it is possible to access each individual text field programmatically by its tag number so that I can get / set its value?

I'm a beginner, and although I know how to access these fields by name, doing it by tag number will make things a lot easier for what I'm trying to achieve in this particular case.

Many thanks: -)

+5
source share
1 answer
the_fourth_textview = [the_superview_containing_all_textfields viewWithTag:4];
+6
source

All Articles