0

I am using twitter fabric and have a table view being populated with a 'tweetsWithJSONArray'.

I am trying to add the showAction boolean to my tweet cells in my tableview func cellForRowAtIndexPath method like so:

let tweet = tweets[indexPath.row]       
let cell = feedTableView.dequeueReusableCellWithIdentifier(tweetTableReuseIdentifier, forIndexPath: indexPath) as! TWTRTweetTableViewCell
cell.configureWithTweet(tweet)
self.feedTableView.allowsSelection = true
cell.tweetView.delegate = self
cell.tweetView.showActionButtons = true

But I'm getting the error that TWTRTweetView dos not have a member named showActionButtons. I am a bit confused by this as the example on the fabric docs looks as follows:

let tweetView = TWTRTweetView(tweet: newlyLoadedTweet)
tweetView.showActionButtons = true
self.addSubview(tweetView)

link:

https://docs.fabric.io/ios/twitter/show-tweets.html

I realise I have it done a bit differently but I'm still unsure how to apply the showActionBoolean in the right way in my case. My tableview has an attached segment control and only when the final segment is selected do I populate my table with a tweetsWithJsonArray, that is why I couldn't take the example from the docs as is.

user2363025
  • 6,365
  • 19
  • 48
  • 89
  • have you imported TwitterKit ? are you sure u downloaded the whole sdk ? how did you import it? manually or with cocoapods ? did you implement TWTRTweetViewDelegate in your class ? – AaoIi Sep 24 '15 at 11:11
  • Yes I have imported TwitterKit, I imported it with cocoapods. I have TWTRTweetViewDelegate in my class definition. I am setting the delegate in my cellForRowAtIndexPath like so: cell.tweetView.delegate = self – user2363025 Sep 24 '15 at 13:31

1 Answers1

1

I had the same problem and after inspecting the SDK documentation I simply found out that setting "showTweetActions" to true works instead of using the Fabric sample to do it (it gave me an error on "newlyLoadedTweet")

//swift

showTweetActions = true

Hope this can help ;)