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 09-20-2010, 09:59 AM   #1 (permalink)
Registered Member
 
Join Date: Sep 2010
Posts: 22
Splatics is on a distinguished road
Default Getting the position of cell that was clicked

I am implementing the UITableViewDelegate Override method:

- (void) tableViewUITableView*)tableView didSelectRowAtIndexPathNSIndexPath*)indexPath
{
}

Is there a way to get the x and y component of the indexPath so I know the exact position of what cell the user selects? Thanks!
Splatics is offline   Reply With Quote
Old 09-20-2010, 10:52 AM   #2 (permalink)
Registered Member
 
Join Date: May 2010
Posts: 32
garyshaf is on a distinguished road
Default

Quote:
Originally Posted by Splatics View Post
I am implementing the UITableViewDelegate Override method:

- (void) tableViewUITableView*)tableView didSelectRowAtIndexPathNSIndexPath*)indexPath
{
}

Is there a way to get the x and y component of the indexPath so I know the exact position of what cell the user selects? Thanks!
Sorry, but why would you need the x and y components of the table cell? Wouldn't the indexPath.section and/or indexPath.row be adequate to know what cell has been clicked?
garyshaf is offline   Reply With Quote
Old 09-20-2010, 11:13 AM   #3 (permalink)
Registered Member
 
Join Date: Sep 2010
Posts: 22
Splatics is on a distinguished road
Default

Quote:
Originally Posted by garyshaf View Post
Sorry, but why would you need the x and y components of the table cell? Wouldn't the indexPath.section and/or indexPath.row be adequate to know what cell has been clicked?
I am trying to create an animation so that when a user selects a cell a uiview will look like its coming out of the cell and fill the width and most of the height of the screen.
Splatics is offline   Reply With Quote
Old 09-20-2010, 11:16 AM   #4 (permalink)
Registered Member
 
Join Date: Sep 2010
Posts: 22
Splatics is on a distinguished road
Default

Getting the touch point would probably work as well. How would I get the touch point for a UITableViewController?
Splatics is offline   Reply With Quote
Old 09-20-2010, 11:43 AM   #5 (permalink)
Registered Member
 
Join Date: May 2010
Posts: 107
JDave is on a distinguished road
Default

if you are using iOS4, then you can use gestures...

http://developer.apple.com/library/i...Reference.html

very easy to setup:

when you create your cell, add a gesture recognizer.
when the user taps the point you want, the gesture recognizer will know the x,y coordintes and you can work off that from the selector your gesture recognizer set-up.
JDave is offline   Reply With Quote
Old 09-20-2010, 12:03 PM   #6 (permalink)
Registered Member
 
Join Date: Sep 2010
Posts: 22
Splatics is on a distinguished road
Default

Quote:
Originally Posted by JDave View Post
if you are using iOS4, then you can use gestures...

Loading…

very easy to setup:

when you create your cell, add a gesture recognizer.
when the user taps the point you want, the gesture recognizer will know the x,y coordintes and you can work off that from the selector your gesture recognizer set-up.
Perfect! thanks!
Splatics is offline   Reply With Quote
Reply

Bookmarks

Tags
position, uitableview, uitableviewcells

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: 314
13 members and 301 guests
2ndSegment, cayladv57, cgokey, djohnson, Domele, Hamad, linkmx, markuschow, pungs, Sloshmonster, teebee74, v1n2e7t
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,655
Threads: 94,116
Posts: 402,889
Top Poster: BrianSlick (7,990)
Welcome to our newest member, pungs
Powered by vBadvanced CMPS v3.1.0

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