Wrong frame value while accessing the view from storyboard in IOS

后端 未结 2 1733
北海茫月
北海茫月 2021-02-08 00:58

I am accessing the size of the frame of view from storyboard. Below is my code for accessing frame property from storyboard.

SmallView *smallView = [self.storybo         


        
2条回答
  •  伪装坚强ぢ
    2021-02-08 01:07

    Gettings a frame of a viewController's view which might not even displayed is not a good practice. The point where you can assume, everything is in place is the viewControllers's ViewDidLoad method.

提交回复
热议问题