Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Nov 23, 2012, 07:24 PM   #1
moonman239
macrumors 6502a
 
Join Date: Mar 2009
Find location of table view cell that calls view controller

How do I do that?
__________________
The funny thing about this signature is that by the time you get to the end of it, you will have spent between five and ten seconds doing so.
moonman239 is offline   0 Reply With Quote
Old Nov 23, 2012, 09:08 PM   #2
ArtOfWarfare
macrumors 601
 
ArtOfWarfare's Avatar
 
Join Date: Nov 2007
Send a message via Skype™ to ArtOfWarfare
You could set a variable in your tableView:didSelectRowAtIndexPath: method. I have to ask though: why do you need to know? What is it you're looking to do?
ArtOfWarfare is offline   0 Reply With Quote
Old Nov 24, 2012, 08:52 AM   #3
Duncan C
macrumors 6502a
 
Duncan C's Avatar
 
Join Date: Jan 2008
Location: Northern Virginia
 
see vendor information in user profile
Quote:
Originally Posted by moonman239 View Post
How do I do that?
By writing code.

(My answer is about as clear as your question.)

There are probably a dozen different ways to do what you describe. Which one makes sense depends on how your program is structured, if you're using storyboards or XIB files, how you represent your data model, etc, etc.

Without a more complete picture, there's no way to provide meaningful help.
__________________
Regards,
Duncan Champney, WareTo.
Check out our latest iOS app, Face Dancer, available for free on the App Store.
Duncan C is offline   0 Reply With Quote
Old Nov 24, 2012, 05:31 PM   #4
MattInOz
macrumors 68030
 
MattInOz's Avatar
 
Join Date: Jan 2006
Location: Sydney
What method is the cell calling on the view controller in controller in question?

Is the view controller a standard view controller, like a tableview controller?

Is the Cell a standard tableviewCell or a custom subclass?

A quicklook in the documentation for UITableviewController tells me there is no reason a standard cell would call back to the view controller. Also looking in the documents UITableview has the a number of methods for finding indexPath of a cell or alternatively a point in the tableview.

The bigger question could why?
What are you trying to do if you are trying to get the cells to respond to a gesture then there are ways to attach a gesture recogniser to the tableview make make it seem like its acting on the cells from the users perspective. A lot of the reasons for a cell to send a message back have easier more effective and more reliable ways of going about them.
__________________
There is no such thing as "Collective Wisdom"
[ iPhone 5s, iPad Mini, 13" MacBookPro 2.7Ghz, 27"Al iMac i7, Black MacBook 13"]
MattInOz is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

Forum Jump


All times are GMT -5. The time now is 09:48 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC