Frage

I'm setting an attribute called target with Interface Builder.

like so

This works fine on the simulator. However when I change the destination to my iPhone and run the app, the value does not get picked up. I get (null) when I try and access the target attribute. What could be the issue?

I'm trying to access the value in viewDidLoad method of my view controller.

War es hilfreich?

Lösung

It was a memory management issue. While defining the target property in the class, I had defined the storage as weak. Changing it to strong fixed this.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top