i have following scene in interface builder.
and following code in viewdidload function of controller
print(string.init(format:"basecircleview width %f height %f", basecircleview.bounds.size.width, basecircleview.bounds.size.height)) print(string.init(format:"userdrawingview width %f height %f", userdrawingview.bounds.size.width, userdrawingview.bounds.size.height)) print(string.init(format:"view width %f height %f", self.view.bounds.size.width, self.view.bounds.size.height))
when launch app (on iphone6 simulator "view : iphone se" selected in storyboard), have following in console :
basecircleview width 320.000000 height 504.000000
userdrawingview width 320.000000 height 504.000000
view width 375.000000 height 667.000000
i not understand why 2 views infer sizes device "view : iphone se" selected in storyboard , not superview.
can me figure what's wrong ?
you should test constraints @ viewdidlayoutsubviews.
here blog post additional info uiviewcontroller lifecycle: https://blog.caramba.io/ios-uiviewcontroller-lifecycle-261e3e2f6133
Comments
Post a Comment