I noticed something very strange with Xcode 9. When I’m on the main storyboard and I change the device selected to view the view controllers in the appropriate format, I noticed that the width of my table view in viewDidLoad is incorrect if the selected device in the storyboard is different from the one on which I deploy the device. I did tests, and it seems that the layout of the selected device on the storyboard is done.
Has anyone already experienced this problem?
This issue is also present in beta version 9.1 of Xcode.
, UITableViewCell. .
layoutSubviews() layoutIfNeeded() , . :
override func layoutSubviews() { super.layoutSubviews() print("cardView frame: \(cardView.frame)") // Storyboard size cardView.layoutIfNeeded() print("cardView frame: \(cardView.frame)") // Runtime device size // Perform your layout here. }
, !
Source: https://habr.com/ru/post/1686727/More articles:Scratch file not working on IntelliJ IDEA - intellij-ideaBootstrap navbar-toggler-icon does not appear, but it works fine - htmlСоздание статического отчета из динамической блестящей уценки - rHow to kill a running process using ansible? - processPrinting all variables and their values - pythonHow to install libgfortran.so.4 on ubuntu 16.06 - fortranA property does not exist on a Reagent component if it is defined using recomposition - reactjsHow to add UITextField to UIToolbar with flexible width in iOS 11 using auto-layout - objective-cWhat does "back pressure" mean in Rxjava? - backpressureHow to get all jars loaded by Java application in Java9? - javaAll Articles