can i change the text colour of Done button in UIDocumentInteractionController? Currently there is a white Done button which is not giving proper look
Asked
Active
Viewed 1,087 times
2
-
Similar to [this](http://stackoverflow.com/questions/20604212/how-to-add-uigesturerecognizer-to-uidocumentinteractioncontroller-preview). – Bonga Mbombi Mar 17 '15 at 10:33
-
Similar but not the same. The buttons are there; they're just fundamentally the wrong color in iOS 8. I can't imagine why it's setup this way...white on white. – TahoeWolverine Mar 24 '15 at 19:00
1 Answers
1
Are you setting a tintColor for your app window? That will change the color of some system-generated buttons, like the Cancel button in a UIDocumentInteractionController on an iPhone. I couldn't find a way to override that, so I ended up temporarily changing the app tint color before showing a document interaction controller, then changing it back:
- (IBAction)openIn:(NSURL *)URL {
UIDocumentInteractionController *controller = [[UIDocumentInteractionController interactionControllerWithURL:URL] retain];
controller.delegate = self;
self.appDelegate.window.tintColor = [UIColor blackColor]; // temporary override
[controller presentOpenInMenuFromBarButtonItem:self.openInButton animated:TRUE];
}
- (void)documentInteractionControllerDidDismissOpenInMenu:controller {
[controller release];
self.appDelegate.window.tintColor = self.appDelegate.textColor; // restore the tintColor
}
I plan to file a bug report for this, because my app has a dark color theme with white text, and that creates white text on a white background in lots of system-provided UI elements. I think these elements should only change their text color to match the app if they also offer a way to change their background color to match the app.

arlomedia
- 8,534
- 5
- 60
- 108