Observing an NSMutableArray for insertion/removal

But shouldn’t the synthesized accessors automatically return such a proxy object? No. What’s the proper way to work around this–should I write a custom accessor that just invokes [super mutableArrayValueForKey…]? No. Implement the array accessors. When you call these, KVO will post the appropriate notifications automatically. So all you have to do is: [myObject insertObject:newObject … Read more

How can I do Key Value Observing and get a KVO callback on a UIView’s frame?

There are usually notifications or other observable events where KVO isn’t supported. Even though the docs says ‘no’, it is ostensibly safe to observe the CALayer backing the UIView. Observing the CALayer works in practice because of its extensive use of KVO and proper accessors (instead of ivar manipulation). It’s not guaranteed to work going … Read more

What’s the best way to communicate between view controllers?

These are good questions, and its great to see that you’re doing this research and seem concerned with learning how to “do it right” instead of just hacking it together. First, I agree with the previous answers which focus on the importance of putting data in model objects when appropriate (per the MVC design pattern). … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)