diff --git a/TwitterKit/TwitterKit/Social/Identity/TWTRWebViewController.m b/TwitterKit/TwitterKit/Social/Identity/TWTRWebViewController.m index 1091a6e4..309db050 100644 --- a/TwitterKit/TwitterKit/Social/Identity/TWTRWebViewController.m +++ b/TwitterKit/TwitterKit/Social/Identity/TWTRWebViewController.m @@ -150,15 +150,15 @@ - (void)enableCancelButtonWithCancelCompletion:(TWTRWebViewControllerCancelCompl - (void)initWebView { // From: https://stackoverflow.com/questions/26295277/wkwebview-equivalent-for-uiwebviews-scalespagetofit NSString *jScript = @"var meta = document.createElement('meta'); meta.setAttribute('name', 'viewport'); meta.setAttribute('content', 'width=device-width'); document.getElementsByTagName('head')[0].appendChild(meta);"; - + WKUserScript *wkUScript = [[WKUserScript alloc] initWithSource:jScript injectionTime:WKUserScriptInjectionTimeAtDocumentEnd forMainFrameOnly:YES]; WKUserContentController *wkUController = [[WKUserContentController alloc] init]; [wkUController addUserScript:wkUScript]; - + WKWebViewConfiguration *wkWebConfig = [[WKWebViewConfiguration alloc] init]; wkWebConfig.userContentController = wkUController; - - WKWebView* wkWebV = [[WKWebView alloc] initWithFrame:self.view.frame configuration:wkWebConfig]; + + WKWebView* wkWebV = [[WKWebView alloc] initWithFrame: self.parentViewController.view.frame configuration:wkWebConfig]; [self setWebView:wkWebV]; [[self webView] setNavigationDelegate:self]; diff --git a/TwitterKit/TwitterKit/TwitterShareExtensionUI/Private/Composer/Attachment Views/TWTRSETweetURLAttachmentView.m b/TwitterKit/TwitterKit/TwitterShareExtensionUI/Private/Composer/Attachment Views/TWTRSETweetURLAttachmentView.m index 50827eb4..8d2c4839 100644 --- a/TwitterKit/TwitterKit/TwitterShareExtensionUI/Private/Composer/Attachment Views/TWTRSETweetURLAttachmentView.m +++ b/TwitterKit/TwitterKit/TwitterShareExtensionUI/Private/Composer/Attachment Views/TWTRSETweetURLAttachmentView.m @@ -132,7 +132,7 @@ - (void)setUpConstraints [self.linkDomainLabel.topAnchor constraintEqualToAnchor:self.linkTitleLabel.bottomAnchor].active = YES; [self.linkDomainLabel.bottomAnchor constraintEqualToAnchor:self.labelsContainerView.bottomAnchor].active = YES; - [self.heightAnchor constraintEqualToAnchor:self.linkPreviewImageView.heightAnchor]; +// [self.heightAnchor constraintEqualToAnchor:self.linkPreviewImageView.heightAnchor]; } @end