Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old Jan 31, 2013, 12:20 PM   #1
azrael2000
macrumors newbie
 
Join Date: Nov 2007
changing color for a label

Hi there.

I am running Snow Leopard and running Xcode 4.0.

I am trying to change the color of text in a label, however I can't seem to get it to work.

I read the developer documentation, and when I use the line:
Code:
[myText setTextColor:<#(NSColor *)#>
I can't find the proper syntax.

Can someone tell me what I am supposed to do? I know that NSColor is looking for a pointer, but nothing I try seems to work.

Simple for others, perhaps, but I am just starting here.

UPDATE: I am getting closer. This doesn't work, but seems to be on track, if that seems right
Code:
 [myText setTextColor:(NSColor *) redColor];
The program builds ok, but when I run it and click the button to which this is attached, I crash...

Regards

Last edited by azrael2000; Jan 31, 2013 at 01:11 PM.
azrael2000 is offline   0 Reply With Quote

 
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 12:23 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC