更改UISwitch上的文本 [英] Changing the text on a UISwitch

查看:94
本文介绍了更改UISwitch上的文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

UISwitch目前说ON和OFF。我可以将文字改为YES而不是吗?

The UISwitch currently says ON and OFF. Can I change the text to YES and NO?

会不会很难?或者我只是改写一下我问用户的问题?

Would it be hard? Or do I just rephrase the question I ask the user?

推荐答案

从iOS 6开始,你可以设置

As of iOS 6, you can set

@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.

此图像的大小必须小于超过或等于77点宽
和27点高。如果您指定较大的图像,边缘可能是
剪裁。

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.

这篇关于更改UISwitch上的文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆