I am working on a app where I want to expand a tableviewcell to cover almost all the screen with animation when it is selected by user. I am looking to create a uiview on the开发者_StackOverflow社区 tableviewcell and expend it to cover major portion of the screen when user selects the row.
The main problem I am having is to get the frame from where my pop up view will start expending. How will I get the frame of the row which is touched?
Thanks
PankajIs it crucial that the cell should not reposition? If not ( i am guessing not, as you are anyway planning to cover whole screen):
When the cell is selected, scroll the cell to top (using scrollToRowAtIndexPath
) and either insert your custom view to cell's contentView or modify its parameters if its already there with different opacity/size etc
Use UITableView
function to get the rect for the row by passing the its NSIndexPath
.
- (CGRect)rectForRowAtIndexPath:(NSIndexPath *)indexPath
精彩评论