我遇到了一个问题,即MSMessagesAppPresentationStyleExpanded时MSMessagesAppPresentationStyleCompact中有一个空白的上边距。
我从MSMessagesAppViewController创建了我的UIViewController,并调用:
self.currentViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"MainMenu"];
[self.currentViewController.view.leftAnchor constraintEqualToAnchor:self.view.leftAnchor].active = true;
[self.currentViewController.view.rightAnchor constraintEqualToAnchor:self.view.rightAnchor].active = true;
[self.currentViewController.view.topAnchor constraintEqualToAnchor:self.view.topAnchor].active = true;
[self.currentViewController.view.bottomAnchor constraintEqualToAnchor:self.view.bottomAnchor].active = true;
最初工作正常,MSMessagesAppPresentationStyleExpanded。再次切换到MSMessagesAppPresentationStyleCompact时会出现此问题。其中一直有一个空白的上边距。像: