mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-20 23:35:01 +00:00
fix crash when setting title while to content view is set
This commit is contained in:
1 parent
0c72c52ba2
commit
eafbebcebb
1 file changed
+4
@@ -352,6 +352,7 @@ CPBelowBottom = 6;
|
||||
[_titleView setAutoresizingMask:CPViewMinYMargin];
|
||||
break;
|
||||
}
|
||||
|
||||
[self sizeToFit];
|
||||
[self setNeedsDisplay:YES];
|
||||
}
|
||||
@@ -361,6 +362,9 @@ CPBelowBottom = 6;
|
||||
var contentFrame = [_contentView frame],
|
||||
offset = [self _titleHeightOffset];
|
||||
|
||||
if (!contentFrame)
|
||||
return;
|
||||
|
||||
[_contentView setAutoresizingMask:CPViewNotSizable];
|
||||
[self setFrameSize:CGSizeMake(contentFrame.size.width + _contentMargin.width * 2,
|
||||
contentFrame.size.height + _contentMargin.height * 2 + offset[0])];
|
||||
|
||||
Reference in new issue
Block a user