问题内容: I need to center an UILabel inside of a circular CAShapeLayer and I don’t know how to do it. Besides, I would like to know whether it’s strictly necessary using a CATextLayer. 问题评论: 1 An alternative approach would be to subclass UILabel and add a CAShapeLayer as a sublayer. Then override any methods calculating