6 TWTRTimelineViewController issues




I’m not sure if many are having these issues but I wanted to document them

Issue #1: Tweet size and separator inset on iPad landscape
If you take a look at the attached images you will see that something with the tweet view isn’t right. some tweets backgrounds are extended onto the next. So that there is a white background going over the next tweet. And some tweets height is too big, leaving unnecessary empty space. Also the separator insets don’t extend to the width of content view.

Issue #2: TWTRTimelineViewController hides UITabBarViewController tab
This issue is discussed here: TWTRTimeLineViewController Hides Tab Bar Item Image

Solution to issue #2: solution is not the ideal way to deal with the issue
So the solution looks like this UITabBarController -> UINavigationController -> UIViewController

Issue #3: Embedding UIViewController in UINavigationBarController causes timeline issues
Though it solves issue #2, in my case the timeline went under the navigation bar that came with the UINavigationBarController.

Issue #4: BarButtonItems and navigation title don’t appear
With the above solution its not possible to set the title or any BarButtonItems in IB for the navigationBar of the UINavigationContoller. NavigationBar is always empty unless set programatically

Issue #5:Navigation bar doesn’t appear.
Assuming we don’t go with the solution above and just have a
UITabBarController -> UIViewController and insert a custom navigationBar in IB. The navigationBar doesn’t appear at all. I’m assuming its hidden behind the timeline?

Issue #6: can’t get self.tabBarControler
Trying to do the following:
let parentTabBarController = self.tabBarController as! ChartDetailTabBarController
But getting nil. This same code works in the other UIViewController

Initially I wanted just UITabBarController -> UIViewController with a custom navigationBar but because of the issues above, I embedded my UIViewController in a UINavigationController

Load tweets from a #hashtag in tabelview cells using logInGuestWithCompletion

@AceGreen1989 Thanks for bringing these to our attention.

Regarding issue #1: we have not seen this issue and will need to do some investigation. Can you show some code how you are setting up the controller so we can try to replicate?

Regarding issue #2: The TWTRTimelineViewController does not have access to your app’s tab bar items. This is something that you need to set explicitly when you create your tab bar controller. If you do not set the tab bar items the tab bar controller will try to infer the tab bar item and image based on the view controller’s title. We do not set the title for the TWTRTimelineViewController so it doesn’t show anything. If you are saying that we are clobbering the existing image somehow then that is another story; you can test this by replacing the TWTRTimelineViewController with a generic view controller and seeing if you get a tab bar item.

Regarding issue #3: iOS 7 changed how navigation controllers place their content in relation to the navigation bar. Your navigation bar has a translucent property, if this is set to YES the navigation controller will place the content under the navigation bar and set the table view’s content inset to the height of the navigation bar. If you do not want this then you can just set the navigation controller’s navigation bar’s translucent to NO.

Regarding issue #4: We added support for using time line view controllers in IB in a recent release. You can drop a UITableViewController in IB and change the class to TWTRTimelineViewController. You will then be responsible for directly setting the dataSource property on the TWTRTimelineViewController.

Regarding issue #5: I will need to see how you are coding this solution to offer much insight. You will likely have to add the navigation bar as a subview of the time line controller and adjust the content insets for this to work. I would recommend just embedding the timeline view controller in a navigation controller and let the system handle this for you.

Regarding issue #6: I will need to know what your view controller hierarchy looks like in this situation to offer much more insight. What happens when you walk the VC hierarchy and print the classes? Does your ChartDetailController show up? Something like should print this out for you.
parentVC = self; while (parentVC) { NSLog(@"%@", [parentVC class]); parentVC = parentVC.parentViewController }


@chaselatta I would love to setup a short 1-to-1 to show you things directly and be as efficient as possible.


@chaselatta I have created a demo project to show issue #1, #2, #4, #6 in detail. Ignore other issues for now. issues are listed in order of importance.


Please follow these steps to replicate each of the 4 issues.

Issue #1:

  • Run project on iPhone (from small to large)
  • Rotate between landscape and portrait
  • Look for white backgrounds going over tweets (landscape mode)
    *** See them mostly on iPad and in landscape mode
  • Look for tweets with pictures with large space above and below picture (landscape)
    *** The larger the screen, the bigger the space (like on iPad) happens only in landscape

Issue #2:

  • Editor -> Embed In -> Tab Bar Controller
  • Select the tab Bar item and set the System Item to whatever
  • Run project = image will not appear
  • Use solution provided and put a UINavigationController in between the two as such
    UITabBarController -> UINavigationController -> UITableViewController
  • Item will appear
  • Item would appear if you didn’t use TWTRTimelineViewController as the class for the UITableViewController

Issue #4:

  • With current setup (i.e. UITabBarController -> UINavigationController -> UITableViewController)
  • Give your UITableViewController a title and add a barButtonItems (to the navigationBar provided by the UINavigationController)
  • Run project, nothing will appear
  • Title and barbuttonitems would appear if you didn’t use TWTRTimelineViewController as the class for the UITableViewController

Issue #6:

  • Add a .swift file for your UITabBarController and assign your Controller to it

  • In your .swift file create a variable called symbol

  • In your UITableViewController, create the same symbol variable.

  • Try to do the following in your UITableViewController class

    let parentTabBarController = self.tabBarController as! ChartDetailTabBarController
    symbol = parentTabBarController.symbol

  • Above code would work if your UITableViewController class was not TWTRTimelineViewController

  • Regardless if you have a UINavigationController between your UITableViewController and your UITabBarController


@AceGreen1989 we have looked into the issues and found a bug that was causing all the issues except for number 1. The problem stems from how we are initializing code when the view controller is created from interface builder. We have implemented a fix that will be going out either today or tomorrow. If you want to work around this for now you can just manually the create the view controller in code which will avoid the problem.

As far as issue #1, we are looking into that right now and will hopefully have more info soon.


Hey, you just made me super happy!!! Awesome stuff

Regarding issue #1: can you replicate the issue. if not maybe we can have a short chat to show you how it looks on my iPad. It would be lovely to solve this issue while you are at it.

A side request: Can you add the ability to change the backgroundColor of TWTRTimelineViewController. Currently its some shade of gray.


just call self.view.backgroundColor = myColor in your viewDidLoad method or wherever it makes sense for you to do so.

We are able to reproduce issue number 1 but have not had a chance to implement a fix.


Yea that was known but I’m using IB and was wondering why we can’t just set it there? I wonder if this will be fixed with the new initialization you are implementing.

Please note issue #1 is the most important one. I would really love for it to be included in the next SDK release so I can submit my app for iOS9



Following feedback based on Twitter 1.10.0

Issue #1:
Still open and probably the most important one

New issues:

Issue #7: View won’t appear unless scrolled
The TWTRTimelineViewController seems to load the data but not present it as before. Now I need to tap/scroll somewhere within the view for it to reflect. Was not like that before, and nothing in my code changed

Issue #8: Setting backgroundColor:
Setting backgroundColor through IB is not possible (should be). Setting up backgroundColor through self.view.backgroundColor = UIColor.whiteColor() causes the separators to appear without data (as a standard UITableView would without data). Previously and without setting backgroundColor, the empty view would just appear grey without separators. Also in this case, the view needs tap/scroll before data appears

Additional comment:
I would like to add is regarding the twitter icon in each tableViewCell. In my opinion thats a little cheesy. I do understand that twitter want to show that its their tweets and some sort of brand recognition but maybe it should be done differently. It only makes sense to add an icon on tweet cell if we are available to add other steaming sources and you want to show the twitters coming from twitter.

Solution: I would suggest placing the icon somewhere else and in one place. For example, the refresh can be a twitter icon instead of the animating circle, etc.



We did not ship a fix for issue number 1 in version 1.10.0; this bug has been prioritized and we will try to get a fix in place for our next release. However, you should be able to work around this bug by calling [self.tableView beginUpdates]; [self.tableView endUpdates]; during your rotation events - this will refresh the height of the cells. The exact time you need to call this depends on which version of iOS you are targeting because the rotation methods all changed in iOS 8.

We will look into issue number 7 and try to get a fix out in the next release but for the time being can you try calling reloadData on the tableview when the data loads to force a refresh?

The problem with issue 8 is that we are setting the background color in viewDidLoad. I have updated the code already to honor the value set in IB and that change will go out in the next release.

Regarding the Twitter Icon. This is something that is not likely to change as this was a decision made by our design and branding teams. If you want more information about this decision you can contact support@fabric.io.


Regarding issue #1:

I’m only targeting iOS 8 & 9 and I tried the following

        // Request Twitter Feed
        let client = TWTRAPIClient()
        self.dataSource = TWTRSearchTimelineDataSource(searchQuery: "$\(self.symbol)", APIClient: client)

This doesn’t fix the height issues. the height issues are not because of rotation. As a matter of fact, my app is only available in landscape. This issue is there when the View is loaded. I tried to move the code above into the ViewWillLayoutSubviews() but that caused infinite amount of messages saying there is no guest session and that I should that deprecated loginGuest method.

Issue #7: reload data after self.dataSource doesn’t help as there is no completion handler now so there is no way to check if its done before reloading table.

Also if I wait long enough (LONG) the data does load (without tap/scroll) with the following error:

2015-09-11 18:27:36.918 StockSwipe[994:191850] This application is modifying the autolayout engine from a background thread, which can lead to engine corruption and weird crashes. This will cause an exception in a future release.
0 CoreFoundation 0x00000001834d8f74 + 148
1 libobjc.A.dylib 0x0000000197f7ff80 objc_exception_throw + 56
2 CoreFoundation 0x00000001834d8ea4 + 0
3 Foundation 0x00000001844f25d8 + 88
4 Foundation 0x0000000184374a1c + 36
5 UIKit 0x0000000188b33958 + 64
6 UIKit 0x0000000188b33b9c + 548
7 UIKit 0x0000000188b33968 + 80
8 UIKit 0x0000000188a2a2d8 + 240
9 UIKit 0x0000000188b7335c + 640

10  UIKit                               0x0000000188b306d4 <redacted> + 68
11  UIKit                               0x0000000188b372e8 <redacted> + 28
12  UIKit                               0x0000000188b3a420 <redacted> + 364
13  StockSwipe                          0x00000001002c7428 +[TWTRViewUtil addVisualConstraints:toView:options:metrics:views:] + 168
14  StockSwipe                          0x00000001002c7248 +[TWTRViewUtil addVisualConstraints:toView:views:] + 92
15  StockSwipe                          0x00000001002b7024 -[TWTRTweetTableViewCell commonInit] + 420
16  StockSwipe                          0x00000001002b6e6c -[TWTRTweetTableViewCell initWithStyle:reuseIdentifier:] + 84
17  UIKit                               0x0000000188b772ec <redacted> + 500
18  StockSwipe                          0x00000001002a1434 -[TWTRTimelineViewController tableView:cellForRowAtIndexPath:] + 100
19  UIKit                               0x0000000188d7167c <redacted> + 688
20  UIKit                               0x0000000188d717d4 <redacted> + 80
21  UIKit                               0x0000000188d613d4 <redacted> + 2440
22  UIKit                               0x0000000188d76364 <redacted> + 104
23  UIKit                               0x0000000188b17a90 <redacted> + 176
24  UIKit                               0x0000000188a2b00c <redacted> + 644
25  QuartzCore                          0x0000000188231f14 <redacted> + 148
26  QuartzCore                          0x000000018822cb20 <redacted> + 292
27  QuartzCore                          0x000000018822c9e0 <redacted> + 32
28  QuartzCore                          0x000000018822c07c <redacted> + 252
29  QuartzCore                          0x000000018822bdd0 <redacted> + 516
30  QuartzCore                          0x000000018825af48 <redacted> + 236
31  libsystem_pthread.dylib             0x00000001989821e8 <redacted> + 584
32  libsystem_pthread.dylib             0x0000000198981d60 <redacted> + 136
33  libsystem_pthread.dylib             0x0000000198981544 pthread_mutex_lock + 0
34  libsystem_pthread.dylib             0x0000000198981028 start_wqthread + 4


issue #8: Happy to hear that.

Twitter icon: I’ll email them my comments below.


Just took 1.10.1 for a spin, here’s some feedback:

Issue #1: still there
Issue #7: resolved
Issue #8: still there



Just installed the latest update,

Issue #1: Still there
Issue #8: Resolved

Regarding issue #8: I did notice that now as data is being loaded, the table shows the standard separators. this looks ugly in my opinion. I did extend the footer to cover it (thats the current workout with regular UITableViews)

Just an idea: if you guys add something like https://github.com/dzenbot/DZNEmptyDataSet you can use it for branding twitter and removing the icon from every tweet. That view appears when the view first appears, and as long as their is no data (you can set when it should appear. also you can add the reload to be a twitter icon.

Also there is no a way to check for no data and data done loading

heres how the view looks in my app:


Status report: 1.11.1

Issue #1: Still there

Also see comments I made regarding issue #8 because they are still apply


Has this issue been resolved? I’ve been running into problem #5 listed above, where the navigation bar does not appear for a UIViewController. Embedding the ViewController in a NavigationController didn’t solve the problem.


Status report: 1.11.2

Issue #1: Still there


Any progress? Patiently waiting here :slight_smile:


Can’t wait any longer for a solution.

Have removed the Twitter Tab and Fabric from my App until a solution is found to Issue #1



Its a little frustrating that its taking so long, I shipped an update with issue #1 in place.

I’m surprised not more developers are pushing this but that’s why its not at a high priority for Fabric to fix.


Well, it’s the most popular non-Bitcode topic here! :wink:

For the sake of completeness, this issue is still present with 1.11.3