开发者

Presenting/dismissing modal view controller which contains a table makes the table go down

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜