I setup a view controller scene with interface builder. I add a view to my controller and add a custom class (CustomView) to it.
The view controller code
class ViewController: UIViewController {
@IBOutlet var myCustomView: CustomView!
override func viewDidLoad() {
super.viewDidLoad()
}
override func viewDidAppear(animated: Bool) {
print(myCustomView.frame.origin)
}
}
The question
Why the origin of myCustomView
is equal to (-4.0, 64.0) and not (0, 64) ?