I present/dismiss modal view controller with tableview in it. Each presenting/dismissing causes the table to move down, leaving a gap between the table and top of the view. so each time i present after a dismiss, i see my table going down one row-height distance . keeping the routine, the table really 'leaves ' the screen. Please help.开发者_运维问答
I've run into this a few times and did the workaround (re-setting the frame) because of time pressure, but the last time I ran into it I found a real fix. Instead of creating your top level view controller in code (if it is), try having it be created in the UIWindow and IBOutlet it to the AppDelegate instead.
Worked for me.
If you use XIB, check autoresize option of your table view in the Interface Builder
精彩评论