UISegmentedControl custom background image

kviksilver picture kviksilver · Aug 2, 2010 · Viewed 18.8k times · Source

I have UINavigationBar setup as image - some wood texture. I want to insert UISegmentedControl with 4 buttons on that bar. Buttons should have same texture with slightly changed tint.

One solution would be to change tint alpha of buttons background color, so that texture in background can get trough, but as I set alpha for tint in IB it doesn't save value, it always gets back to value 1.

I cant get UISegmentedControl to show background image, so finally gave up and decide to search for help... Effect that is desired is one in iBooks app, with buttons in Navigation Bar. Any link or small help would be appreciated..

Answer

Dylan picture Dylan · Jan 6, 2011

This post describes the steps involved and has sample code: http://idevrecipes.com/2010/12/13/wooduinavigation/