当我在 UIView 的 init 方法中调用 self.frame.size.height 时,结果为 0。
界面视图:
- (id)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
NSLog(@"Content,init: %f",self.frame.size.height);
...
UIView 创建:
m_content = [[Content alloc] init];
m_content.frame=self.frame;