Giter Club home page Giter Club logo

ratreeview's People

Contributors

anatols avatar antonholmquist avatar augustyniak avatar daikini avatar dduan avatar dumoko avatar kkebo avatar qoolloop 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  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

ratreeview's Issues

typo in RATreeView.m

122: self.rowsExpandingAnimation = RATreeViewRowAnimationTop;
123: self.rowsExpandingAnimation = RATreeViewRowAnimationBottom;

should be

122: self.rowsExpandingAnimation = RATreeViewRowAnimationTop;
123: self.rowsCollapsingAnimation = RATreeViewRowAnimationBottom;

UIImage Indentation

Thank you for making such a wonderful control. When I add an image to my tableview cell, how can I achieve indentation of the image as well.

Using RATreeView with CoreData

Hi thanks for developing this great api.
I want to feed RATreeView with items which I get from sqlite db with core data.
FetchedResultsController needs sectionIndex. which I can't get from data source method.
do you know how can I provide sectionIndex?
would you mind provide a sample of treeView using coreData?

丫的,你这内存泄露太严重了!

我用了你的ratreeview做的cell,然后用的sdwebimage加载图片,发现滑动cell 的时候内存泄露太严重了。耽误了我的项目进度,丫的赔我钱吧!
而且滑动的时候还卡,耽误我项目进度,丫的赔我钱!

treeNodeInfo.treeDepthLevel is always zero

In my Application I am using the treeDepthLevel property of RATreeNodeInfo to get the key for the next level children But to my surprise that property is always equal to zero instead of the current node level

Hide unused cell

Is is also possible to hide unused cell? In the old tableview, I could set the footer height to some very small number, say, 0.01f and then create an empty uiview as the footer. Any plan to implement similar functionality?

Reordering Table cells

Hi!
Thanks for such a great control. This is what i was looking for. Just wanted to ask, how i can reorder (drag/drop) cells. I couldn't find any delegate for that. Is it possible?

Adding open/closed disclosure to Cells

Thank you for such wonderful control.

This is not an issue, I was wondering is it possible to have UITableViewCell which was expanded, I checked following delegate method is being called whenever any tree is being expanded but was not able to understand how to access particular UITableViewCell from this method.

  • (void)treeView:(RATreeView *)treeView willExpandRowForItem:(id)item treeNodeInfo:(RATreeNodeInfo *)treeNodeInfo

I want to add open/closed state using image to inform user regarding cell is expanded.
e.g.

tableViewCell.image = @"Opened" or tableViewCell.image = @"Closed"

Can you please assist ?

Thanks,

expandRowForItem won't call the delegate: treeView: willExpandRowForItem: treeNodeInfo:

just use the demo, when call

  • (void)expandRowForItem:(id)item withRowAnimation:(RATreeViewRowAnimation)animation

but the delegate of

  • (void)treeView:(RATreeView *)treeView willExpandRowForItem:(id)item treeNodeInfo:(RATreeNodeInfo *)treeNodeInfo;

won't be called.

I found that this delegate will be called in

  • (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath

in RATreeView+TableViewDelegate.

can't find on pods

pod search RATreeView
[!] Unable to find a pod with name matching `RATreeView'

Expand All

Is there a way to expand all the nested cell with one call ?

How to delete rows from RATreeView?

It was so easy to use RATreeView in my app and it looks great. Thank you for such a useful bit of code.

The earlier closed issue doesn't apply anymore as there is no public visibility of the tableview property in RATreeView.

There seems to be no way of deleting rows. The comment in the header file suggests there is but there is no selector.

expandRowForItem crash when treeNode.expanded is YES

I try to call the expandRowForItem:, I get a crash that table view try to insert rows.

I think it is that the row is expanded, and I expand it again!

I can not access the treeNode for the item, so I can not get the expand status.

I hope you can add some code like this:

- (void)expandRowForItem:(id)item withRowAnimation:(RATreeViewRowAnimation)animation
{
  NSInteger index = [self.treeNodeCollectionController indexForItem:item];
  RATreeNode *treeNode = [self.treeNodeCollectionController treeNodeForIndex:index];
+    if (treeNode.expanded) {
+        return;
+    }
  [self expandCellForTreeNode:treeNode withRowAnimation:animation];
}

Word Wrapping

When the labels get too long, they get cut off with ellipses "...", but if it's necessary to see the whole label, wrapping texts could be useful. I have tried to implement it to no avail. Do you have some suggestions as to a solution for this?

Retain cycle - make parentTreeNode property weak

In RATreeNode:

@property (strong, nonatomic, readonly) RATreeNodeInfo *treeNodeInfo;

Should be:

@property (weak, nonatomic, readonly) RATreeNodeInfo *treeNodeInfo;

There's a retain cycle here and it's causing whatever model you are using for your tree to never get dealloced.

Thanks!

RATreeView itemForCell

Hi,

First I would like to say thanks for the great work this is a really awesome library to use.

I've started implementing your RATreeView and have come across a situation where I need to handle a tap gesture on a custom View that I use as the cell contentView and all works fine.

I however run into an issue when I handle the tap gesture on a button in the view as I am able to get the UITableViewCell which it originated from but need to then get access to the corresponding "item" in the RATreeView.

I basically need a method with signature: - (id) itemForCell: (UITableViewCell *) cell.

I am writing to you for the following reasons:

  • I really appreciate the quality and effort of the code you have done and would prefer to keep on using further version of it via pods. This however leaves me with a problem, if I Implement my own solution within RATreeView class then I wont be able to get the dependency updated via pods.
  • If you deem this useful it could perhaps be added to the library thus removing the need for us to maintain a fork of the project.

Regards
Rory Beling

WillSelectRow item value incorrect

In RATreeView+TableViewDelegate.m:

- (NSIndexPath *)tableView:(UITableView *)tableView willSelectRowAtIndexPath:(NSIndexPath *)indexPath

The line:

id item = [self.delegate treeView:self willSelectRowForItem:treeNode treeNodeInfo:[treeNode treeNodeInfo]];

Should probably be:

id item = [self.delegate treeView:self willSelectRowForItem:treeNode.item treeNodeInfo:[treeNode treeNodeInfo]];

Unless my two weeks of Objective C programming is leading me astray, which it may be. However, making this change fixed my issues with handling this event.

indexPathForCell

The view should probably have indexPathForCell and/or itemForCell added to it. This would make it easier to get the associated item on a touch event, say from a button added to the cell. And there are many times when an item is available and a cell is needed.

Disable Auto scrolling to top

Hi,

i'm facing a problem, when i expand a cell the treeview automatically scrolls to top. I can't disable it using scrollsToTop or alwaysBounceVertical properties of tableview.

How can i disable this?

Thanks!

How to get tableView height ?

I have this RATreeView inside a collection view cell.
When the table view cell expands I want to increase the collection view cell height.
But how can i get the height of the tableView after expanding so that i can expand the collection view cell to same amount.
In RATreeView i can only access contentSize which is not giving proper results.
Thanks

Default select child item

how to implement to expand the father first child menu item by default when i click father menu item ?
Is there anybody know that?

Grouped table view

Does it currently support Grouped style tableview? I've set the style to RATreeViewStyleGrouped, but all my data are in the same section.

BTW, thanks for the great work 👍

table cell separator not showing

Using the sample app running iOS 7.x. Expand Phones section and expand Computers section.

ios simulator screen shot nov 23 2013 12 25 04 pm

Close Phones section and then close Computers section (order is important). The cell separator between Phones and Computers section is not showing.

ios simulator screen shot nov 23 2013 12 25 10 pm

expandRowForItem

Thanks for creating this great component!
One issue i have is when i try to use the expandRowForItem this only works for items in the highest leaf, not with children :( Any suggestions to fix this?

Crash when depth level greater than 3

In my project i want to have 4 level tree so i used this source code but after adding 4 level tree my app crash when collapsing a cell with animation. following is the crash report found in my project

"Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Cell animation stop fraction must be greater than start fraction' "

And My Tree is like following
_First_level_item 1
_______ Second_level_item 1
_____________Third_level_item 1
_____________Third_level_item 2
_____________Third_level_item 3
_____________Third_level_item 4
___________________Fourth_level_item 1
___________________Fourth_level_item 2
__________________*Fourth_level_item 3

register class support for RATreeView

// Creating Table View Cells
- (void)registerNib:(UINib *)nib forCellReuseIdentifier:(NSString *)identifier NS_AVAILABLE_IOS(5_0);
- (void)registerClass:(Class)cellClass forCellReuseIdentifier:(NSString *)identifier NS_AVAILABLE_IOS(6_0);

simple implementation

- (void)registerClass:(Class)cellClass forCellReuseIdentifier:(NSString *)identifier
{
  [self.tableView registerClass:cellClass forCellReuseIdentifier:identifier];
}

reloadData not work

hi
reloadData method not work.
and after that numberOfChildrenOfItem of datasource not call.

for example add this code in end of viewDidLoad of your Demo Project

walls = [RADataObject dataObjectWithName:@"Walls1" children:nil];
self.data = [NSArray arrayWithObjects:phone, computer, car, bike, house, flats, motorbike, drinks, food, sweets, watches, walls, nil];
[treeView reloadData];

you will see still Wall shown as last object of table view instead of Walls1

scrollViewDidScroll not called

If I implement - (void)scrollViewDidScroll:(UIScrollView *)scrollView{ in the tableview delegate, the method is never called. Any idea how to get it called?

not find button index in treeview

I am implement RATreeView in my Project . I create custom cell in which button for first level.So my issue is how to find which button is click from firstlevel in RATreeview . In tableview we have set tag of button and get index of button but how to done in RAtreeView

separatorInset crashes on iOS6

RATreeVIew contains

  • (UIEdgeInsets)separatorInset
    {
    return self.tableView.separatorInset;
    }
  • (void)setSeparatorInset:(UIEdgeInsets)separatorInset
    {
    self.tableView.separatorInset = separatorInset;
    }

that crash on iOS6

cellForItem method called before expanding was completed

When the user taps on a cell and it expands. The method cellForItem is called again but this is done before the expanding was completed. Therefore the expanded property of treeNodeInfo is always NO. This makes it impossible to return another TableViewCell for expanded state.

button index

How to find button index in RATreeView.i have implement this lib. in my project but how to set tag and find index of button (V)in this lib.
screen shot 2014-02-03 at 2 37 59 pm

The separator line of previous cell disappears

The separator line of the cell above the tapped cell gets hidden.
Scenario: Tap on second cell of levelDepth 0, It open ups levelDepth1 for the same cell.
Tap again on the same cell (i.e levelDepth 0) It will close the levelDepth1 for the cell

Now observe the separator line of the previous cell. It is disappeared

initWithFrame not working for custom sizes

I have tried many combination but couldn't get working one

RATreeView *treeView = [[RATreeView alloc] initWithFrame:CGRectMake(0, 0, 320, 300)];

RATreeView *treeView = [[RATreeView alloc] initWithFrame:CGRectMake(0, 0, 320, 300) style:RATreeViewStylePlain];

both not working, then I have created xib with view, assign RATreeView, connect with code as IBOutlet and still not working for custom sizes

All of this examples not working if you wanna smaller size for view, is there any fix for this or I making something wrong???
Every time they are in full screen mode :(

Thx

Use the titleForDeleteConfirmationButton..

Hi,

First of all, thanks for you lib.
I just used it to make a treeview, and every things working fine.
But i'd like now to be able to select an item (depth doesn't matter), I saw that there is a interested function which is the Delete button appearing when we slide Right > Left.
Is there a way to catch the button action ?
I'm a beginner in iOS programming and objective-C (started yesterday).

Thanks in advance,

How can I delete rows in RATreeView?

I tried to use [self.treeView.tableView deleteRowsForIndexPaths:withRowAnimation:], but always crash:

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid update: invalid number of rows in section 0.  The number of rows contained in an existing section after the update (9) must be equal to the number of rows contained in that section before the update (9), plus or minus the number of rows inserted or deleted from that section (0 inserted, 1 deleted) and plus or minus the number of rows moved into or out of that section (0 moved in, 0 moved out).'

RATreeViewRowAnimation equivalent for UITableViewRowAnimationFade

There is no enumeration that corresponds to UITableViewRowAnimationFade enumeration in RATreeViewRowAnimation. I had to add it and make related conversion myself.

What's the reason of specifically excluding fade animation from animation alternatives?

Also I have a more general question. What's the reason behind defining your own enumerations for almost all enumerations that UITableView defines? I didn't see any different usage for them, you're requesting your own enumeration key, then convert it to UITableView's corresponding enumerations that everybody is familiar with.

I think it adds redundancy to the component and decrease simplicity.

What you think about that?

Dynamically changing the tableview Cells...

First off, thank you so much for offering this project code on here. It's exactly what I was looking for.

I'm sure it's just me but I'm having issues trying to dynamically change the cell between a default style to my own custom style when the user expands a parent cell.
I've created my own subclasses uitableviewcell. I can get it to change between default style cells but I can't find a way to init my custom one and change the cell in the "willexpandrow" method.

Can you offer any help or is this not possible?

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.