In my project I have a subclass A
of a UIPickerView
.
In Interface Builder I have a UIPickerView
whose type I have changed to my subclass A
.
In another class B
, also defined in my code, instantiated in Interface Builder and linked to A
via its outlet, it refers to A
with an IBOutlet field A *mySubclass
.
The problem is this:
When running on the simulator it works fine; A breakpoint on B
’s awakeFromNib
confirms that mySubclass
has been loaded and is indeed of type A
.
When running on the device (iOS4.1 on iPhone 4) however, the same breakpoint reveals that mySubclass
is now of type UIPickerView
.
增加<代码>awakeFrom Nib至>>确认,在模拟器码上运行时,
's awake 来自Nib的器具是用的,而不是用在装置上。
是否有任何想法说明这一点?
事先得到任何帮助,
Teo