Pregunta

Mi código para mi NSTextFieldCell es:

- (void)drawInteriorWithFrame:(NSRect)cellFrame inView:(NSView *)controlView {
    // Drawing code here.
    NSGradient *gradient = [[NSGradient alloc] initWithStartingColor:[NSColor lightGrayColor] endingColor:[NSColor grayColor]];
    [gradient drawInRect:cellFrame angle:90];
    [[self title] drawInRect:cellFrame withAttributes:nil];

}

Me gustaría tener la NSTextFieldCell tener esquinas redondeadas .... ¿cómo podría hacerlo?

¿Fue útil?

Solución

Utilice la propiedad de capa de NSView, entonces se puede establecer un radio de esquina para ello.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top