If your segmented control is set up correctly to respond to the control event UIControlEventValueChanged, you can access the index of the selected segment with selectedSegmentIndex
The default value is UISegmentedControlNoSegment (no segment selected) until the user touches a segment. Once they do, calling selectedSegmentIndex: will return a NSInteger. From there you can store the string male or female depending on the index.
Example:
NSString *gender = @"unknown";
NSInteger *selectedIndex = yoursegmentcontrol.selectedSegmentIndex;
if (selectedIndex == 0)
gender = @"male";
else
gender = @"female";