2

I am developing an iPad app. I want to show a UISegmentedControl with both image and text in each segment. Is it possible to do so?. Please clarify.

Thanks in advance.

durai
  • 903
  • 2
  • 12
  • 21

1 Answers1

0

Check this Answer for a Two-Line-SegmentControl. Just put UIImageViews instead of additional UILabels in the segments.

Community
  • 1
  • 1
Jenson
  • 909
  • 14
  • 20
  • 1
    the code you pointed out just takes in multiline text inside single label. Where should we add UIImageViews in your code? Can you please elaborate? Thanks. – NightFury Dec 18 '12 at 07:03
  • The code placed own views into the segments view hierarchy before. It was changed to use just images now. A solution to your problem would be a UIView with an UILabel and an UIImageView. Render its layer into an image context and use that image in your segment. – Jenson Jan 17 '13 at 00:48