away as long as at least one person is holding on to its leash. So the dog’s retain count is at least 1. When no one is holding onto that leash, the dog will run away (dealloc). Many people can have leashes hooked to the dog (though that would be weird).
call methods on the object with both strong and weak references. So.. both a person holding the leash (strong property) and a person standing near the dog but not holding the leash (weak property) can pet the dog, or kick the dog, or give the dog commands or see the dog.
number of strong pointers to an object. When the count is 0, the object is destroyed (deallocated). This is why our circle object a few slides ago perished. It’s retain count had reached 0 because nothing had a strong pointer to it.
a retain count of 1. It’ll be 1 as long as it’s in scope of held strongly by another object. Assigning a strong property (e.g. an instance variable) to carObject ups the retain count to 2. When the scope ends (when the method returns), the memory mgmt system decreases the retain count to 1, but it still isn’t 0 because of its assignment to the instance variable.
initializer pattern which covers the 3 possibilities: 1) returns self (what happens the VAST majority of the time). 2) returns nil (something went horribly wrong). 3) returns an instance of a different class (rare). - Your super class may fail to initialize. - If self is nil, and you don’t return nil, you will crash, returning nil allows you to fail gracefully.
type CGRect. The difference is that a view’s frame is relative to the superview while a view’s bounds is relative to itself. Therefore the origin of a bounds is always 0,0. A views bounds is often the same as its frame BUT a rotated view will have a different bounds.size than frame.size.
and size CGRectGetWidth(), CGRectGetHeight() - self-explanitory CGRectGetMaxX() - gets the width + the x-offset CGRectGetMaxY() - gets the height + the y-offset
correspond to one physical pixel. On a device with a retina screen, a line that is one point wide may actually result in a line that is two physical pixels wide.
see these suffixes appended to to images. What do they mean? The Asset Catalog will automatically match up images suffixed with @2x and @3x with retina and retina HD respectively: .
and read the following comment from Apple: “// If the number of view controllers is greater than the number displayable by a tab bar, a "More" navigation controller will automatically be shown.”