访问UISwitch中的UILabel

来源:互联网 发布:nexvap电子烟 知乎 编辑:程序博客网 时间:2024/06/06 09:21

UIView *mainView =[[[[mySwitch subviews] objectAtIndex:0] subviews] objectAtIndex2];
UILabel *onLabel = [[mainView subviews] objectAtIndex:0];
UILabel *offLabel = [[mainView subviews] objectAtIndex:2];

//相关Label的操作
//……

原创粉丝点击