怎么垂直放置标签,条形区域显示名字

效果图

如图,我想垂直显示UILabel,像正常的图片有100.200.300.400那样,Calculate Graph垂直对齐,显示标签如Risk那样。

可以旋转标签哦:

label.transform = CGAffineTransformMakeRotation(M_PI_2*3); // 90 degress
 CGFloat DegreesToRadians(CGFloat degrees)
{
 return degrees * M_PI / 180;
};

 CGAffineTransform transform = CGAffineTransformMakeRotation(-DegreesToRadians(90));
 label.transform = transform;