FORMATTING: added comment to workaround

This commit is contained in:
Didier Korthoudt
2016-01-21 00:10:38 +01:00
parent 3411c340ab
commit b3d8180541
+7
View File
@@ -618,6 +618,13 @@ var CPBoxTypeKey = @"CPBoxTypeKey",
if (_boxType != CPBoxSeparator)
{
// FIXME: we have a problem with CIB decoding here.
// We should be able to simply add : _contentView = [self subviews][0]
// but first box subview seems to be malformed (badly decoded).
// For example, when deployed, this view doesn't have its _trackingAreas array initialized.
// As a (temporary) workaround, we encode/decode the _contentView property. We then transfer the subview hierarchy
// and replace the first (and only) box subview with this _contentView
_contentView = [aCoder decodeObjectForKey:CPBoxContentView] || [[CPView alloc] initWithFrame:[self bounds]];
var malformedContentView = [self subviews][0];
[_contentView setSubviews:[malformedContentView subviews]];