DrawRect on the iPhone vs. the Mac
Posted
by Joe Cannatti
on Stack Overflow
See other posts from Stack Overflow
or by Joe Cannatti
Published on 2010-06-14T19:34:14Z
Indexed on
2010/06/15
2:12 UTC
Read the original article
Hit count: 207
I am an experienced iPhone dev beginning to work on my first Mac app. One thing that is really throwing me off is the differences between UIView and NSView. It seems that I cannot set the background color of a NSView via interface builder as I can with a UIView. It also seems that I cannot do it by simply sending a setBackgroundColor: message to it. All the examples I have seen are overriding drawRect: in a subclass of NSView. Is that really the only way to do it? What is the conceptual difference here, and why is it this way? NOTE: I am only trying to set the background color to the default grey.
© Stack Overflow or respective owner