Search code examples
iphoneiosxcodeios4

How can i get the textfield value from tag in iPhone sdk?


if i have a tag of text field then how can i pick the value of textfield in iPhone sdk


Solution

  • you should be fine with something like (assuming that the TextField is a self.view's subview):

    NSString *text = [(UITextField *)[self.view viewWithTag:THE_TAG] text];