iphone – 更改UISwitch上的文本

UISwitch当前表示ON和OFF。我可以将文本更改为YES和NO吗?

会很难吗或者我只是重申我问用户的问题?

从iOS 6开始,您可以设置

@property(nonatomic, retain) UIImage *offImage;
@property(nonatomic, retain) UIImage *onImage;

文件说:

This image represents the interior contents of the switch. The image
you specify is composited with the switch’s rounded bezel and thumb to
create the final appearance.

The size of this image must be less than or equal to 77 points wide
and 27 points tall. If you specify larger images, the edges may be
clipped.

http://stackoverflow.com/questions/2711180/changing-the-text-on-a-uiswitch

本站文章除注明转载外,均为本站原创或编译
转载请明显位置注明出处:iphone – 更改UISwitch上的文本