bennyguitar/CollapseClick — pull request #13 by hSATAC (2013-07-31 15:29:59+00:00)
Title: Implement layoutSubviews

## Proposal

Implement `layoutSubviews` to recalculate frame according to subview of `cell.ContentView`

## Symptom

The frames of `cell` and `cell.ContentView` is set during initialization. If we change the height of cell's content, there's no way to adjust the layout now.

All we have is `reloadCollapseClick` but this method will reset everything. We need a way to refresh the layout gracefully.

## Scenario

The content view is generated programmatically according to some json API, so the height of this view is dynamic. We have to redraw this view and refresh layout of CollapseClick after a successful request.

## Usage

```
// the content view frame has been changed.
test1View.frame = CGRectMake(0, 0, test1View.frame.size.width, test1View.frame.size.height + 50);

// tell CollapseClick to refresh layout.
[myCollapseClick setNeedsLayout];
```