I am trying to write a simple TableView which does the following:
If the user presses a button located on the left of the cell, a subview will pop-up over the button. The subview will have a larger height than the TableViewCell, and will have a button on it which when pushed pops the subview.
I am having difficulty adding the subview to the cell. I am wondering if I am going about this all wrong, and should maybe just be adding the subview on top of the tableView, rather than having the cell try to do it.
Any suggestions? Thanks in advance!
From your description I guess you want a custom UITableViewCell with a UIControl at the left as a subview. Pressing the UIControl should animate a different subview on top of the current cell.
That's fine, but if you are having trouble with it, post the details or do some research on custom UITableViewControllers and UITableViewCells. This may help: Fast Scrolling in Tweetie with UITableView, UITableView construction, drawing and management (revisited). Not only is on the way of what you are trying to achieve, it will also improve the performance of your tables.
This project is an alternate way to achieve what you are trying to do: https://github.com/thermogl/TISwipeableTableView/tree/master/SwipeableExample it lets you swipe back and forth the current cell to reveal a different view.