Pregunta

Can I declare and initialise the colour inside the message to myLabel? Or this the only way to do it? Sorry if this is to simple for you guys.

- (IBAction)changeLabel:(id)sender {

NSColor *green = [NSColor greenColor];
[myLabel setTextColor:green];

}

¿Fue útil?

Solución

Yes you can :)

- (IBAction)changeLabel:(id)sender {
     [myLabel setTextColor:[NSColor greenColor]];
}
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top