bennyguitar / CollapseClick

A collapsible list that functions like a UITableView, except you can collapse and open cells on a click. Feed it UIViews for what is shown when each cell is open. Works via delegation similar to UITableView.
MIT License
533 stars 83 forks source link

Set content height / allow for Navigation Item #22

Open josephmorrill opened 10 years ago

josephmorrill commented 10 years ago

I'm trying to use this class in XCode 5 in Storyboard, and it work fine loading content and appearing. The only problem I'm having is that I can't seem to figure out how to adjust the height of the CollapseClick object so that it doesn't start at the top - it starts underneath the Navigation Item I have on the view controller. A negative setContentOffset sort of works, but then scrolling resets it so that it jumps back to the top.

daviddelmonte commented 10 years ago

My solution for the top Navigation item is as follows: In the sample, the main view is a Collapse Click class view. Add a second main view, and make the Collapse Click view smaller - i.e. not take up the whole screen. screen shot 2014-07-04 at 07 10 16

My solution to setting the cell height, was to return a Nib for the CollapseClickCell, (referred to in the storyboard) where I can draw what I want.