Adding a modal view controller when I press a info button inside a tableviewCell

Posted by gvalero87 on Stack Overflow See other posts from Stack Overflow or by gvalero87
Published on 2010-03-18T00:08:54Z Indexed on 2010/03/18 0:11 UTC
Read the original article Hit count: 842

Hi,

Here is a complex question, maybe it's not hard but there are many doubts i have. First let me give you what i have. This is the only place where i've gotten good answers.

I have a table view controller with custom cells. In those cells i added a button (info dark one from IB) for each one of the cells. What i would like it's that when I press that button it displays a new view with more information about that cell, different of the view that i get from didSelectRowAtIndexPath.

I've read a little bit about Modal View Controller and I think this is a case where I should use it. So here are my questions:

  1. How do i make a view controller a modal view controller?. I read that i have to have a delegate. Is there an example of how to create a normal modal view controller. I haven't been able to do so.

  2. How can this button know which cell is it from?. What i have right is a subclass tableviewcell with an IBOUTLET to this info button. This is not an important question because i guess i just could add a NSIndexPath attribute.

  3. I added an action in my tableviewsubclass that is triggered when the touchDown Event is called. I did this connection through IB. How can I call the modal view controller through here?, and is it even the right place to do this?

Thanks

© Stack Overflow or respective owner

Related posts about modal-view-controller

Related posts about uibutton