Changing of UISwitch text in iOS 4.2

前端 未结 5 994
名媛妹妹
名媛妹妹 2020-12-11 20:18

I am trying to change the text in UISwitch. The sample from the website ( Changing the text on a UISwitch ) works fine but when I upgrade my xcode to 3.2.5 and iOS 4.2, the

5条回答
  •  心在旅途
    2020-12-11 21:17

    Don't do this. Manipulating the private view hierarchy of framework controls is absolutely unsupported, and can cause incompatibility with OS updates. Especially as your code does absolutely no verification of the hierarchy, so you can very easily crash if the number or type of subviews doesn't match what you were expecting.

提交回复
热议问题