更改UISwitch上的text
為要更改Text的UISwitch建立IB連接:例如mySwitch,在代碼中改變文字:
((UILabel *)[[[[[[self.mySwitch subviews] lastObject] subviews] objectAtIndex:2] subviews] objectAtIndex:0]).text = @"Foo";
((UILabel *)[[[[[[self.mySwitch subviews] lastObject] subviews] objectAtIndex:2] subviews] objectAtIndex:1]).text = @"Bar";
更多信息請(qǐng)查看IT技術(shù)專(zhuān)欄