0
我想在界面構建器中渲染垂直滑塊,但是,當我嘗試設置值界面生成器時,會給我一個警告。UISlider - IB_DESIGNABLE - 運行時屬性警告
我在這裏做錯了什麼?
@IBDesignable
class VerticalSlider: UISlider {
@IBInspectable var setOrientation: Bool! {
didSet {
if setOrientation == true{
self.transform = CGAffineTransformMakeRotation(CGFloat(-M_PI_2))
}else {
self.transform = CGAffineTransformIdentity
}
}
}
}