The problem is that barButtonFont
is nil
, (probably because you don't have a font called Helvetica CE available). This problem is only exposed when you move to the literal syntax, because "Neither keys nor values can have the value nil in containers. If the compiler can prove that a key or value is nil at compile time, then a warning will be emitted. Otherwise, a runtime error will occur."
There is more detail here: http://clang.llvm.org/docs/ObjectiveCLiterals.html