2
Pourquoi le transform rotation
n'est-il pas affiché/prévisualisé dans le storyboard? Cela fonctionne très bien dans l'application. J'ai d'autres attributs dans ma classe @IBDesignable
qui fonctionne bien.Swift - @IBDesignable - Rotation non affichée à l'intérieur du Storyboard
Comment puis-je y parvenir?
@IBDesignable
class CustomUILabel: UILabel {
@IBInspectable var label_Rotation: Double = 0 {
didSet {
rotateLabel(label_Rotation)
}
}
func rotateLabel(labelRotation: Double) {
self.transform = CGAffineTransformMakeRotation(CGFloat(M_PI_2 + labelRotation))
}
}