xcode label rotate text code example Example: xcode label rotate text yourLabelName.transform = CGAffineTransform(rotationAngle: CGFloat.pi / 2)