草庐IT

bottomPoint

全部标签

iphone - 如何设置 UILabel 非矩形框

我正在尝试制作一个边缘如下图所示的UILabel。这是来self的UILabel子类的drawRect:。-(void)drawRect:(CGRect)rect{[superdrawRect:rect];CGContextRefcontext=UIGraphicsGetCurrentContext();CGContextSaveGState(context);CGRectlabelRect=self.bounds;CGPointbottomPoint=CGPointMake(labelRect.size.width,rect.size.height);CGPointtopMinus3