I have a MFMailViewController that shows what the user answered on the previous page. There were also some areas which they had to pick Yes or No through a segmentedcontrol object.
What I mean here is the property for the TextField is Name.text, but what is the .text for UISegmentedControl?
For example, if the user picked “Yes” in the SegmentedControl, it would show ‘Do you agree to these terms = YES’ in the Mail composer.
Thank you!
You can use the
titleForSegmentAtIndex:method.You could do something like this.
Let’s say the user picked the “Yes” segment. Then the output of this code would be: “Do you agree to these terms = Yes”;
Hope this helps!