xcode label rotate text

Swift
yourLabelName.transform = CGAffineTransform(rotationAngle: CGFloat.pi / 2)

Source

Also in Swift: