The UIView output is zero when tested on the device, but works fine in the simulator

My setup is very simple. There is a ViewController (set as the initial one in the storyboard) that loads from nib (VC has no view, and nib contains only the view). The review also shows a point of view.

The code is as follows:

import Foundation import UIKit class MyViewController : UIViewController { @IBOutlet weak var outputView: UIView! //ctrl-dragged from InterfaceBuilder override func viewDidLoad() { super.viewDidLoad() self.outputView.backgroundColor = UIColor.blueColor() } } 

Here nib:

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

screenShot

Everything works fine in the simulator (iPhone 6). The white look turns blue as expected. But when working on a real device (iPhone 6 8.4 - the goal is 8.4). Xcode throws me a brick, screaming that outputView is unexpectedly zero.

What should I do now?

UPDATE

Apparently, this is a bug in Xcode 7. I tried to create a new project on another computer and test on another iPhone, and the result is exactly the same. I will report this to bugreport.

+5
source share

All Articles