English 中文(简体)
Adding a modal view controller when I press a info button inside a tableviewCell
原标题:

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

问题回答

How about you just push a "detail view" onto your navigation controller stack? The mechanics are the same for modal view controllers as they are for others. you just need to remember to use the [self presentModalViewController:arrayViewController animated:YES]; when pushing your detail view.





相关问题
Plist Hierarchy and All Option

I have a string of data in a plist, which I ve got to display, hierarchically like this: Menu>Chapter>SubChapter>item>item details This might be super simple, in my initial menu, how would I have ...

Disable iPhone table rows

Is there any way to disable the "selectibility" of a UITableView row? Example: I would like to make an appointment for a haircut at a certain time with a certain stylist. What gets displayed to a ...

Nonintrusive visual cue for uitableviewcell

I d like to mark a tableview row in some way that shows it has been clicked by the user. I have a large number of rows and want users to know if they have already visited a particular row. This same ...

TableView oval button for Index/counts

Can someone help me create an index/count button for a UITableView, like this one? iTunes http://img.skitch.com/20091107-nwyci84114dxg76wshqwgtauwn.preview.jpg Is there an Apple example, or other ...

Unable to pushViewController for subview

I have a UINavigationController and I have seperate UIViews that I switch between using a UISegmentControl. On switching the views, I add the view as a subview to my navigation controller s view: [...

热门标签