I wonder how and when (viewDidLoad, viewWillAppear, viewDidAppear) can I get the size of the UIViews frame that was authorized to fit its layout view?
It is not clear from your question why you want this, but I assume that this is a layout of your approaches. Fortunately, Apple knew that you would want to do this and implemented -(void)layoutSubViewsit to see this: When is the Subviews layout called?
-(void)layoutSubViews
layoutSubviews, , , , CGContext .
layoutSubviews
CGContext
, , , init UIView, viewWillAppear.
init
UIView
viewWillAppear
, UIView, ( Google Apple docs SO).
- (void)viewDidAppear:(BOOL)animated { CGFloat uIViewWidth = self.uIView.bounds.size.width; CGFloat uIViewHeight = self.uIView.bounds.size.height; CGRect uIViewSize = CGRectMake(0, 0, uIViewWidth, uIViewHeight); }
NSLog(@"%f; %f; %f; %f;", yourView.frame.origin.x, yourView.frame.origin.y, yourView.frame.size.width, yourView.frame.size.height);