UIView Archive

A Quick tip: Adding and removing NSNotificationCenter observers in UIView subclass

It is sometimes needed for a UIView subclass to register as an NSNotificationCenter observer. However, there seems to be no good place for adding/removing NSNotificationCenter observers… The best place, I have found so far, is in willMoveToWindow: and didMoveToWindow

TUTORIAL: Draw a nice triangle view with a border using CAShapeLayer

Drawing a custom-shaped background view with a CAShapeLayer is an easy way, how to decorate the app and make its titles or headers more distinguished. The demo app The demo app for this tutorial contains only one view with a background image, a