Skip to content

Instantly share code, notes, and snippets.

@Nub
Created October 3, 2011 04:21
Show Gist options
  • Select an option

  • Save Nub/1258429 to your computer and use it in GitHub Desktop.

Select an option

Save Nub/1258429 to your computer and use it in GitHub Desktop.
- (void)addSubview:(UIView *)view{
if (view.frame.size.width == 7) {
[super addSubview:view];
return;//Ignore scrollbar
}
CGSize currentSize = self.contentSize;
currentSize.height += view.frame.size.height;
[self setContentSize: currentSize];
CGRect thisFrame = view.frame;
thisFrame.size.width = self.frame.size.width;
view.frame = thisFrame;
CollapseView *newCollapse = [CollapseView collapseViewFromView:view];
//[newCollapse setCollapseAmount:0.45];
[super addSubview:newCollapse];
[self setNeedsLayout];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment