1
有這兩個選項/屬性和廢棄它們的意義是什麼?爲什麼UISwitch onImage/offImage屬性不適用於iOS 7?
從蘋果文檔:
offImage
The image displayed while the switch is in the off position.
@property(nonatomic, retain) UIImage *offImage
Discussion
In iOS 7, this property has no effect.
In iOS 6, 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.
Availability
Available in iOS 6.0 and later.
Declared In
UISwitch.h
我現在應該怎麼辦?用UIButtons替換所有的UISwitch?
是的,你需要UIButton來模擬這種效果。 – Piyuesh
@Piyuesh,這些屬性將被棄用或什麼?如果你不能定製它,現在有什麼UISwitch的意義?是否有可能通過創建子類來使其在iOS 7上工作?謝謝。 – AndrewShmig
我還沒有嘗試過這個子類。 – Piyuesh