所以我有一个奇怪的问题,当我试图绘制一个具有uiview子类的自定义类时,线条粗而模糊但是当我将子类更改为uilabel时,它看起来平滑而薄。只是好奇是否有不同的默认设置启用,如果是这样,它们是什么?
无法发布屏幕
提前致谢
更新: 相关代码注释在更改子类之间没有进行任何更改
CGContextRef ctx = UIGraphicsGetCurrentContext();
// CGContextSetAllowsAntialiasing(ctx, YES);
// CGContextSetShouldAntialias(ctx,YES);
// CGContextSetInterpolationQuality(ctx, kCGInterpolationHigh);
CGContextSetStrokeColorWithColor(ctx, [UIColor blackColor].CGColor);
CGContextSetShadow(ctx, CGSizeMake(0, 3), 2);
CGContextBeginPath(ctx);
CGContextMoveToPoint(ctx, 1, 0);
CGContextAddCurveToPoint(ctx, 5, self.frame.size.height - 10, 15, self.frame.size.height - 1, 30, self.frame.size.height - 1);
CGContextAddLineToPoint(ctx, self.frame.size.width - 30, self.frame.size.height - 1);
CGContextAddCurveToPoint(ctx, self.frame.size.width - 15, self.frame.size.height - 1, self.frame.size.width - 5, self.frame.size.height - 10, self.frame.size.width - 1, 0);
[AppDel.styleChangerController.RoomHightlightColor setFill];
CGContextDrawPath(ctx, kCGPathFillStroke);
[super drawRect: rect];