紧凑型iMessage扩展中的奇数上边距l

时间:2016-10-07 08:34:49

标签: xcode imessage

我遇到了一个问题,即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时会出现此问题。其中一直有一个空白的上边距。像:

enter image description here

如何解决?enter image description here

0 个答案:

没有答案