I am having a problem with terminology I think. Is a ViewController the Controller portion of MVC? Or is it not the same thing. Is this combining the VC of MVC into one file?
Properties like .backgroundColor and .size are these the same thing as the @property and @synthesize and if so is this the same thing as an attribute? Meaning can properties and attributes be interchangeable terms in Objective-C or are they different? For example does .backgroundColor have the @properties syntax in some Cocoa class or is this the wrong way to look at it?
Your
NSViewControllersubclass is definitely the controller in MVC. It controls the view and pushes data from your model classes into it.You are also correct about
.backgroundColorand all other dot-notation properties on built-in Cocoa classes. They are defined with@propertyand@synthesizejust like classes you would write. However, there are more simple classes (actually, they are structs) used within Cocoa (such asNSSizeandNSRange). When you access those fields with dot-notation (such asrange.length, assumingrangeis anNSRange), they are not using@propertyor@synthesizesince they are not actually Objective-C classes at all, but simple C structs.I personally use “attribute” and “property” simultaneously in Objective-C, although other developers may disagree.