AlanQuatermain/AQGridView — Issue #94: Would be nice if AQGridView implemented sizeThatFits
Author: jonruiz
Created: 2011-10-27 22:13:25+00:00
State: open

It would be nice if AQGridView implemented sizeThatFits - I have an "Expander" view that will give a subview as much room as it can and uses sizeThatFits to try to do that. I tried the following (not pretty, but it works) and got the desires result:

// CHANGED: for clients that use this
- (CGSize)sizeThatFits:(CGSize)size {
[_gridData gridViewDidChangeBoundsSize:size];
CGSize sizeThatFits = [_gridData sizeForEntireGrid];
[_gridData gridViewDidChangeBoundsSize:self.bounds.size];
return sizeThatFits;
}
// CHANGED: end changes