TwitterKit SDK 3.2.0 and later share sheet dialog shown with wrong dimensions


I had tweeted about this problem earlier. You can find the tweet and the video showing the problem here:

I am using Xcode 9 SDK and latest TwitterKit from Cocoapods. The app is written in Objective-C. The problem is apparent on both iPhone and iPad. I just tried TwitterKit SDK 3.2.1 and it does not fix it.

The sheet is called with the following simple code:

TWTRComposer *composer = [[TWTRComposer alloc] init];
    if ( URL )
      [composer setURL:URL];
    if ( text )
      [composer setText:text];
    if ( image )
      [composer setImage:image];
    // Called from a UIViewController
    [composer showFromViewController:controller completion:^(TWTRComposerResult result) { }];

The share sheet appears within a too small view resulting in a scroll view. When reverted to SDK 3.1.1, the problem is not seen.

TwitterKit shows only the first line of the tweet

Before the 3.2.1 release, we tried but could not reproduce this issue.
Can you provide what are text and URL are before setting them on composer?

It’d be helpful to specify the issue here also. Is it the smaller scroll view or smaller composer view?



I’m having a simiar issue.
Obj-c and the following versions through Cocoapods:

  • TwitterCore (3.0.2)
  • TwitterKit (3.2.1):
    • TwitterCore (>= 3.0.2)

I’m experiencing this issue when the pre-composed tweet is more than three lines.
The ‘Tweet’ button is not validating correctly when you try to tweet more than 140 characters (still enabled)
When you add or remove characters, this will force a re-layout and a re-validation of the Tweet

Hope this helps!


The composer view seems to be the right size. The problem is with the scroll view.

It happens on any length of URL or text. The content length does not matter.

After closer examination, it looks like the scroll view’s top is shifted down exactly the height of a UINavigationBar. The bottom does not have any problem. Maybe this can help on examining the issue.