You're using two completely different arrays that both happen to be called trucksArray
.
In your viewDidLoad method, the array you're making isn't stored anywhere, so it goes out of scope and is released after the method returns. Did you mean to assign it to an instance variable?