Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 08-25-2011, 06:04 PM   #1 (permalink)
iOS Dev
 
Join Date: Mar 2011
Location: Brazil
Age: 26
Posts: 103
gbergamo is on a distinguished road
Send a message via ICQ to gbergamo Send a message via MSN to gbergamo Send a message via Skype™ to gbergamo
Default UITableView inside a UITableViewCell

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:
Code:
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
Code:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
I have to send an information to the first View (refundViewController). How can I do that?


Thanks!
__________________
Vai de Que? - Car supplies Util - Download
iJob - Job search (Br) - Download
iReembolso Lite - Refound control free - Download
iReembolso - Refound control - Download
gbergamo is offline   Reply With Quote
Old 08-25-2011, 08:20 PM   #2 (permalink)
Cocoa Junkie
 
Duncan C's Avatar
 
Join Date: Dec 2008
Location: Northern Virginia
Posts: 6,003
Duncan C has a spectacular aura about
Default

Quote:
Originally Posted by gbergamo View Post
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:
Code:
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
Code:
- (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

Check out our apps in the Apple App store


Check out this password generator app that shows various techniques including using a data container singleton object to share data between objects in your project.

See this tutorial on using UIView animations and layer animations:

See this thread on generating random, non-repeating text

Check out a very cool Macintosh Kaleidoscopes app called ScopeWorks that we released to the Mac App store.
Duncan C is offline   Reply With Quote
Old 08-26-2011, 09:45 AM   #3 (permalink)
iOS Dev
 
Join Date: Mar 2011
Location: Brazil
Age: 26
Posts: 103
gbergamo is on a distinguished road
Send a message via ICQ to gbergamo Send a message via MSN to gbergamo Send a message via Skype™ to gbergamo
Default

Quote:
Originally Posted by Duncan C View Post
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
iReembolso Lite - Refound control free - Download
iReembolso - Refound control - Download
gbergamo is offline   Reply With Quote
Old 08-26-2011, 01:27 PM   #4 (permalink)
Registered Member
 
Join Date: Sep 2010
Posts: 194
mavrik5150 is on a distinguished road
Default

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

Code:
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.
mavrik5150 is offline   Reply With Quote
Old 08-27-2011, 04:48 PM   #5 (permalink)
Registered Member
 
Join Date: Aug 2011
Posts: 25
rcirka is on a distinguished road
Default

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 |TeamLiquid
Available for freelancing opportunities
rcirka is offline   Reply With Quote
Reply

Bookmarks

Tags
uitableview

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 395
15 members and 380 guests
7twenty7, chiataytuday, cristofercolmbos, dedeys78, fiftysixty, gmarro, iOS.Lover, jonathandeknudt, kilobytedump, Matrix23, raymng, stanny, tymex, UMAD, xerohuang
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,669
Threads: 94,121
Posts: 402,903
Top Poster: BrianSlick (7,990)
Welcome to our newest member, dedeys78
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 04:14 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0