Giter Site home page Giter Site logo

bennyguitar / collapseclick Goto Github PK

View Code? Open in Web Editor NEW
534.0 534.0 83.0 488 KB

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.

License: MIT License

Ruby 1.41% Objective-C 98.59%

collapseclick's People

Contributors

bennyguitar avatar hsatac avatar petersth avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

collapseclick's Issues

Set content height / allow for Navigation Item

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.

CollapseClickCell not loading

Hello,
after doing all the steps, like you wrote, I got the message: "could not load NIB with name 'CollapseClickCell'

Did I miss something out? I don't think I have to configure one, do I?

Collapse Only 1 cell at a Time

Hi,
I'm using your control in my project. I want to ask that is it possible that we can only collapse 1 cell at a time? Whenever I click on any header it should open only that view and must hide the remaining if already opened.

Best way to access sub cell?

What is the best way to specify and access the cells held by each collapsible cell? I cannot figure out how to access the subcells.. I can show the number of cells ok, and give the cells titles, etc.

What I can't figure out is how to set data (text, images etc,) into each cell. Any help would be appreciated.

Load nib file from main Bundle

i have problem with local cocoapod from this library in load nib file for cell and i solve this by presented solution. so fix it please!

SOLUTION:
in path CollapsClickCell.m(file) > + (CollapseClickCell *)newCollapseClickCellWithTitle: index: content: (method) , replace [NSBundle mainBundle] with [NSBundle bundleForClass:[CollapseClickCell class]

Storyboard?

ANy chance that there will be a storyboard example anytime soon?

Doesn't work with CocoaPods

After including it I get the following error which fails the build:

Unable to run command 'StripNIB CollapseClickCell.nib' - this target might include its own product.

Updating Content View Heights dynamically

It looks like the only current way to update heights of content views is to call reloadCollapseClick.

This can be problematic if attempting to use dynamic heights that would change on click.

ReuseIdentifier ?

What about memory management with views?
For example if i will use over 100 views, it will call memory warning.
Use feature like UITableViewCell ?

Is it not working on Ipad ios 8?

I used this lib to my project running on ipad ios 8 but it seems not work. I setup the constraints for CollapseClick and CollapseCell but the sub view cannot full in Width. It always show the width = 600px. Please help to solve that. Thanks

iPad Width Issue

I'm developing both an iPad and iPhone app and this is the desired feature. I'm trying to figure out where I can get the width of the collapse bar to resize for the wider iPad format.

Keep Section Headers on Top when scrolling

When like to keep the section headers on top when scrolling like in a tableview. For example in the contacts app how the "A" will stay above all the "A's" until you scroll out of the "A" section.

Load multiview make the app load slow

I'm facing the problem when loading multi views from other viewcontroller, it make the app loads slow. How can improve the loading not block UI ? Thanks

Multiple screen sizes solution

Hello,

The position of the arrow and lightBorder/darkBorder are hardcoded with a width of 320 pixels.
This works fine on 4s/5/5s but when you switch to bigger devices it starts to become a problem, also when the device rotates the position of these elements remains static.

I was able to fix the arrow and borders by changing the following code:

CollapseClickCell.m:newCollapseClickCellWithTitle

`

CGSize screenSize = [[UIScreen mainScreen] bounds].size;
cell.TitleArrow.frame = CGRectMake(screenSize.width-32, 14, 22, 22);
cell.TitleDarkBorder.frame = CGRectMake(0, 49, screenSize.width, 1);
cell.TitleLightBorder.frame = CGRectMake(0, 0, screenSize.width, 1);

`

Also linked darkBorder and lightBorder.

The device orientation can be fixed by adding a notification when device rotates.

Hope it helps someone

How to used image instead of arrow

In collapseClickArrow.m

  • (void)drawRect:(CGRect)rect method, can I used Image of arrow which was same work as collapseClickArrow ?

If yes then give me suggestion please

Multiple view's

If you add one view multiple times, then the view will appear only in the last item
Example:
-(int)numberOfCellsForCollapseClick {return 3;}
-(UIView *)viewForCollapseClickContentViewAtIndex:(int)index {return imageView;}
We add one view 3 times, but view will appear only in the last CollapseClickCell

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.