Ios self.topLayoutGuide.length有时返回64有时返回20

Ios self.topLayoutGuide.length有时返回64有时返回20,ios,objective-c,uitableview,cocoa-touch,Ios,Objective C,Uitableview,Cocoa Touch,我注意到,在UIViewController中更改UITableView的内容插入后,self.topLayoutGuide.length开始返回64而不是20 UITableView位于UIViewController内部、UINavigationController内部 需要注意的是,self.navigationController.navigationBar.frame.origin.y始终为20 self.topLayoutGuide.length为64有什么原因吗? self.top

我注意到,在UIViewController中更改UITableView的内容插入后,self.topLayoutGuide.length开始返回64而不是20

UITableView位于UIViewController内部、UINavigationController内部

需要注意的是,self.navigationController.navigationBar.frame.origin.y始终为20

self.topLayoutGuide.length为64有什么原因吗?


self.topLayoutGuide.length是如何计算的?

20是状态栏的高度。44是导航条的高度(由deafult确定)。这就是topLayoutGuide.length=64(20+44)的原因。

另外,原因可能是NC层次结构和处理,因为topLayout可能还没有反映导航栏,但稍后会反映