Fabio Gomez
Fabio Gomez

Reputation: 777

TWTRComposer showing invisible Share and Cancel buttons

I am using TWTRComposer to create a share dialogue within my iOS app. However, when the composer shows up, you don’t see the Cancel or Tweet buttons showing at all. After tapping around on the top left and right corners, I learned that the buttons are there but not clearly visible. Here is a screenshot pointing out what I am talking about:

enter image description here

Is anyone else experiencing this? and if so, do you guys know if a fix for this is in place or how to work around this? I cannot update my app in this state as it will provide a bad Twitter experience.

I also tried using TWTRComposerViewController but came to the same issues.

Thanks

Upvotes: 0

Views: 217

Answers (2)

shahil
shahil

Reputation: 1001

Using Fabio Gomez's answer.

Solution for Swift 4.2 :

UIBarButtonItem.appearance(whenContainedInInstancesOf: [UINavigationBar.classForCoder() as! UIAppearanceContainer.Type]).setTitleTextAttributes([NSAttributedString.Key.foregroundColor : UIColor.black], for: .normal)

Upvotes: 0

Fabio Gomez
Fabio Gomez

Reputation: 777

NVM, I found out that I was setting the UIBarButton tint color to white in some other place in my app for another class. So I had to set it back to Twitter color before showing twitter

[[UIBarButtonItem appearanceWhenContainedInInstancesOfClasses:@[[UINavigationBar class]]] setTintColor:UIColorFromRGB(0x3EA1EC)];

Upvotes: 1

Related Questions