UITableView details as a subview
Posted
by Leonardo
on Stack Overflow
See other posts from Stack Overflow
or by Leonardo
Published on 2010-05-15T17:51:20Z
Indexed on
2010/05/15
17:54 UTC
Read the original article
Hit count: 479
Hi all,
I have a UITableView in iPhone with enough cell to make it scrollable. I would like to have a subview display whenever I click on a cell, rather than using the navigation controller behaviour.
The problem is that I cannot calculate the CGRect exactly to have the subview always centered in page, because the CGRect is calculated from top of table, and if I scroll table and click cell, the subview will be added out of screen.
The solution could be easy, but I don't know if it's possible: identify the portion of the current viewable area of the UITableView and obtain in some way the frame and therefore origin and size, then build a subview based on such coordinates. Do you think it's possible without writing not too much code ?
thanks Leonardo
© Stack Overflow or respective owner