In Swift this cause exception, because it's trying to call length method form NSNull
When you use valueForKey: method on NSArray, it returns new array: result of invoking selector "title".
But whenever viewController's title equals nil, there will be NSNull object.
In Swift this cause exception, because it's trying to call
length
method formNSNull
When you use
valueForKey:
method onNSArray
, it returns new array: result of invoking selector "title". But whenever viewController's title equalsnil
, there will beNSNull
object.