@synthesize vs @dynamic, what are the differences?

What are the differences between implementing a @property with @dynamic or @synthesize? 8 s 8 @synthesize will generate getter and setter methods for your property. @dynamic just tells the compiler that the getter and setter methods are implemented not by the class itself but somewhere else (like the superclass or will be provided at runtime). … Read more

Cocoa: What’s the difference between the frame and the bounds?

UIView and its subclasses all have the properties frame and bounds. What’s the difference? 1Best Answer 11 Short frame = a view’s location and size using the parent view’s coordinate system Important for: placing the view in the parent bounds = a view’s location and size using its own coordinate system Important for: placing the … Read more

Cocoa Autolayout: content hugging vs content compression resistance priority

I can’t find a clear answer on Apple documentation regarding Cocoa Autolayout about the difference between content hugging and compression resistance. Can somebody explain their usages and difference ? 8 s 8 A quick summary of the concepts: Hugging => content does not want to grow Compression Resistance => content does not want to shrink … Read more

Xcode – How to fix ‘NSUnknownKeyException’, reason: … this class is not key value coding-compliant for the key X” error?

I’m trying to link a UILabel with an IBOutlet created in my class. My application is crashing with the following error. What does this mean? How can I fix it? *** Terminating app due to uncaught exception ‘NSUnknownKeyException’, reason: ‘[<UIViewController 0x6e36ae0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key XXX.’ 7 75