hit counter

Timeline

My development logbook

UIViewController::viewDidLoad Is Not Called

Spent an hour to check why my viewDidLoad() method was not called.

Breakpoints, debugger, documentation, online forum and whatnot were tried but of no avail.

It turned out I have overridden the wrong method: I have overridden the viewDidUnload() instead. Very obviously I removed the wrong part of code template that were generated by Xcode during project creation.

Epic fail.

Optional Methods

Just learn another feature of objective-c: optional methods.

Use keyword @optional for declaration.

NSArray Is Immutable

Need to use NSImmutableArray if we want to dynamically change the content of an array

In python world, I cannot think of any built-in classes that are immutable

In Java, classes covered by the language standard are usually mutable except java.lang.String. Java places more emphasis on thread-safety of a class instead of mutability

View and Controller

In the research of the best way to let the view and controller interact with each other