The best way to go when offering small amounts of options is checkboxes or toggles.
It's easy to use, you can find out what are the options at a glance, and you know what to do.
Your goal should be to make it feel intuitive and natural, minimizing interactions (number of clicks/taps).
The facebook mobile website uses the classic checkbox element to choose your gender. The con is that it's something you're not that used to see in the native iOS UI, the pro is that it's easy to implement more than two options (Male, Female, "Don't want to tell"?).
If you want to choose between only two values (male or female), a slide is an easy way to show two exclusive choices. But as some people pointed out in other posts (see this question), you may introduce confusion: is the displayed gender the current selection or should I press is to select that gender? (state vs action)
Gender by Alexey Anatolievich on Dribbble
Note: Some users might be upset with the stereotype "blue for boys, pink for girls".
Here is a more native iOS looking solution, you can indeed remove the image above the Male/Female selector. It may be more obvious which one is selected (compared to the toggle above).
Drink It Smart, iOS App