The official documentation for -setImage:forSegmentAtIndex:
says
A segment can only have an image or a title; it can’t have both. There is no default image.
So, no, there is no way to do what you want using the image and title properties.
However, there are a few options to accomplish the objective in different ways.
- if you are going to use the same image for each segment, you could use the appearance methods to set the background and then use the method
-setContentOffset:forSegmentAtIndex:
to move the title to the side of the background image.
- you could create an image that had both the icon and the text in it. This is less than ideal as a change to the text requires exporting of the entire asset again. But is an option.
- the least ideal would be to fake a segmented control using buttons that you write the code for to handle state changes. There may even be some open source options that do just that, so feel free to search for them.