xib 自动布局获取真实的frame
2019-06-21 本文已影响0人
寒雨晚风
UIViewController 中
- (void)viewDidLayoutSubviews
{ [super viewDidLayoutSubviews];//获取真实的frame
// NSLog(@"xzxx %f", _num_keyBoardView.frame.size.width);}
cell /Uiview
-(void)layoutSubviews {
[super layoutSubviews];
[self setNeedsLayout];
[self layoutIfNeeded];
NSLog(@"%@", _contenLabel);