iOS topLayoutGuide using a child view controller d

2019-07-06 17:14发布

问题:

Basically I'm trying to resolve the same problem as this question is asking. However, when I am running the app on iOS 8, everything is working as expected: the child view controller is using its own topLayoutGuide but its position values are set properly according to the ones set at the parent. When I am running on iOS 7 though, the child's topLayoutGuide does not match the parent's.

What has been changed in iOS 8 in order for this to work ?

How can the same behaviour be applied to iOS 7 (possibly without using swizzling and other sorcery as the linked question above mentions.)