cannot update view.layer.frame in viewDidLoad?

前端 未结 5 1900
予麋鹿
予麋鹿 2021-02-19 18:59

I am trying to execute following code in viewDidLoad method of my single view controller project:

self.view.layer.frame = CGRectInset(self.view.layer.frame, 20,          


        
5条回答
  •  鱼传尺愫
    2021-02-19 19:44

    Create your project with an older version of Xcode (for instance I'm using Xcode 4.3.3 for this) . Then you can use setFrame: method with viewDidLoad in any version of Xcode .

提交回复
热议问题