0
当我在我的UIView的init方法中调用self.frame.size.height时,结果为0。在初始化方法中获取UIView大小
的UIView:
- (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;
其实知道答案一直。花费我一些时间来找出答案。我认为我通过发表这篇文章让人们省了些时间解决这个问题的人。 – asdf