Advertise here




Advertise here

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Google Sign In with OpenID
Please do not post the same thing multiple times. The board software automatically flags certain posts as needing moderator attention. This happens the most often for new users. I'm pretty sure this is made clear at the time you attempt to post. Posting the same thing over and over again just makes that many more posts the moderators have to weed through later. This makes us sad. Don't make us sad. If your post/thread doesn't appear, just wait a while. Don't post it again. If it hasn't shown up by the next day, then you can try again. I normally go through posts in the mornings, and try to check a few times throughout the day, but I'm not here 24/7. There will typically be a significant delay before posts are approved. Just be patient.

UITableView inside a UITableViewCell

gbergamogbergamo Posts: 107Registered Users
Hello everyone!

I have a big problem (I think!)

I begin a tabBar application. In appDelegate I put a button in the middle of the tabbar. Ok! this works fine!
When I touch this button, I open a modal view:

RefundViewController *controller = [[RefundViewController alloc] initWithNibName:@\"RefundViewController\" bundle:nil];
[self.tabBarController presentModalViewController:controller animated:YES];
[controller release];


My problem... In this View I have a UITableView w/ self delegate, this Table has a CustomCell, this custom cell has another UITableView, but I have to add another file to delegate this TableView.
Everything works fine! but HOW CAN I GET THE TOUCH ON THE CELL ????
Yeah, I have the method

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

I have to send an information to the first View (refundViewController). How can I do that?


Thanks!
Post edited by gbergamo on
Vai de Que? - Car supplies Util - Download

iJob - Job search (Br) - Download

Replies

  • Duncan CDuncan C Posts: 8,033Tutorial Authors, Registered Users
    gbergamo;368751 said:
    Hello everyone!

    I have a big problem (I think!)

    I begin a tabBar application. In appDelegate I put a button in the middle of the tabbar. Ok! this works fine!
    When I touch this button, I open a modal view:

    RefundViewController *controller = [[RefundViewController alloc] initWithNibName:@\"RefundViewController\" bundle:nil];
    [self.tabBarController presentModalViewController:controller animated:YES];
    [controller release];


    My problem... In this View I have a UITableView w/ self delegate, this Table has a CustomCell, this custom cell has another UITableView, but I have to add another file to delegate this TableView.
    Everything works fine! but HOW CAN I GET THE TOUCH ON THE CELL ????
    Yeah, I have the method

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

    I have to send an information to the first View (refundViewController). How can I do that?


    Thanks!
    A table view inside a single custom table view cell? That sounds pretty awful, both technically and as a user interface.

    I think you're on your own to get that working. It's likely to cause odd problems like not being able to resolve where a gesture belongs.
    Regards,

    Duncan C
    WareTo

    mug

    Animated GIF created with Face Dancer, available for free in the app store.
  • gbergamogbergamo Posts: 107Registered Users
    Duncan C;368791 said:
    A table view inside a single custom table view cell? That sounds pretty awful, both technically and as a user interface.

    I think you're on your own to get that working. It's likely to cause odd problems like not being able to resolve where a gesture belongs.
    Man, for the user interface, it's really cool! I do this: when the user enter in the view I have the table showing the "menu" items, so, when he/she touch on the menu item, this cell grow and show that other cell whit the options...

    You don't have any tip for me? an idea??

    Thanks to reply...
    Vai de Que? - Car supplies Util - Download

    iJob - Job search (Br) - Download
  • mavrik5150mavrik5150 Posts: 194Registered Users
    You could probably assign a Tag value to each Table, so then you can differentiate between which table is being touched by using the Tag value as the first statement in your if block



    NSInteger tableTag = tableView.tag;

    if (tableTag == 20) {
    //Cell in Table one Selected so put action here
    }

    else if (tableTag == 30) {
    //Second Table Cell selected put that action here
    }


    That's just my guess, that's how I handled different UIAlerts that could show up on a specific screen (one alert is for connectivity issues, another for updating some default values, and a third for getting more descriptions on a certain cell) but I don't know for sure it this would work for what you have.
  • rcirkarcirka Posts: 25Registered Users
    You will need to set the delegate of the inner uitableview, preferably to a different class as to not to mix up the delegate of the parant uitableview. As Duncan mentioned, I wouldn't advice doing this either, as it causes performance and usability issues.
    www.RonaldCirka.com

    Equinox |<a href="http://itunes.apple.com/us/app/team-liquid/id381629617?mt=8" target
Sign In or Register to comment.