views:

62

answers:

2

I'm programming for the iPhone and I have an idea for an animation that I want to implement. I want a user tapping on a UITableView cell and it turning 90 degrees and filling up the whole screen with another view that I've made.

I'm wondering how I would do this as well as what knowledge I would need to do this.

Thanks.

Update - I meant the cell itself turning 90 degrees.

+1  A: 

Check out this sample code project from apple... So when you tap a cell in the table, you would load the appropriate content into the portrait view and and display it as is done in this sample which results in full screen portrait view, complete with nice cross-fade transition.

http://developer.apple.com/iphone/library/samplecode/AlternateViews/

I meant the cell itself turning 90 degrees.
Anthony Glyadchenko
wow, I'm trying to even picture what that looks like... so what happens to the other cells when the cell you tap turns 90 degrees? Are you just trying to get the whole UITableView to rotate to landscape or something more complicated then that?
Nope just one cell. When it rotates, it overlaps some of the other cells in the process. Then that same cell expands to fill up the whole view with another view.
Anthony Glyadchenko
That's a pretty crazy concept Anthony. Because a cell is a subclass of UIView... you could look into UIGraphicsGetImageFromCurrentImageContext after having created an imageContext and drawn the cellView into it. That would give you a static image that looks like the cell which you could then add as a sub view ontop, rotate it etc. That's the only way I can think of to extract out of the table, something that would look like it was the cell itself as I cant fathom how you could rotate the actual cell will still in context of the table.
+1  A: 

customize the Cell View ... add method to rotate the view , when tap it call the method as you want....

Robin