ios - UIView outlet is nil when testing on device but works fine in the simulator -


my setup simple. there viewcontroller (set initial in storyboard) loaded nib (the vc has no view, , nib contains view). view in nib has view.

the code looks this:

import foundation import uikit  class myviewcontroller : uiviewcontroller {      @iboutlet weak var outputview: uiview! //ctrl-dragged interfacebuilder      override func viewdidload() {         super.viewdidload()         self.outputview.backgroundcolor = uicolor.bluecolor()     } } 

here's nib:

https://s17.postimg.org/dt3ivctkf/screen_shot_2015_07_22_at_15_59_54.png

screenshot

everything works fine in simulator (iphone 6). white view turns blue expected. when running on actual device (iphone 6 8.4 - target 8.4) xcode throws brick @ me yelling outputview unexpectedly nil.

what do now?

update

apparently bug in xcode 7. i've tried creating new project on computer , testing on different iphone , result same. i'll report bugreport.


Comments

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -