tags:

views:

1220

answers:

2

i have to change the Label of UISWITCH from ON-OFF to YES-NO.i want this method to be implement in seperate class that this methods should be access by other classes. i have tried to implement the snippets provided in the cook book.But hard luck .

+4  A: 

Here is an example on how to do that.

rein
this link is opening the same page.
iamsult
The link works fine here.
ceejayoz
could u please send the complete url
iamsult
http://arstechnica.com/apple/guides/2009/03/iphone-dev-robust-uiswitch-label-swaps.ars
rein
This code is awesome... I just made a static class in my Utilities with that. Works well.
tul697
A: 

Take a look at the custom UISwitch control that I built to allow me to change the background color of the control. You could use the same method to change the text, the font, or the text color very easily. As opposed to the previous answer, you could make the text look nice since it is prerendered as an image instead of a label.

http://www.homick.com/posts/custom-uiswitch-control

The code is available on Github and includes a PSD that is used to build three different png files that the control uses. You can modify the contents of the psd to recreate the png files in whatever format you like. Swap those into the control and away you go.

Duane Homick