Ho un UIView in cui vorrei disegnare un Cerchio che si estende oltre il fotogramma di UIView, Ho impostato i masksToBounds su NO - aspettandomi di poter passare oltre i limiti di UIView di 5 pixel a destra e in basso.Disegno all'esterno di un UIView
Mi aspetto che l'ovale non venga ritagliato ma viene troncato e non si disegna oltre i limiti?
- (void)drawRect:(CGRect)rect
{
int width = self.bounds.size.width;
int height = self.bounds.size.height;
self.layer.masksToBounds = NO;
//// Rounded Rectangle Drawing
//// Oval Drawing
UIBezierPath* ovalPath = [UIBezierPath bezierPathWithOvalInRect: CGRectMake(0, 0, width+5, height+5)];
[[UIColor magentaColor] setFill];
[ovalPath fill];
[[UIColor blackColor] setStroke];
ovalPath.lineWidth = 1;
[ovalPath stroke];
}
Ho provato che - non ha funzionato ... – OneGuyInDc
self.layer.masksToBounds = NO non aiuta il ritaglio – pixelrevision