I am adding chat functionality to my app using JSQMessagesViewController. I am going with a dark theme and made the chat dark except for the send message bar. I have not been able to figure out how to change its color (See screenshot below). Can someone tell me how to change the color of the send message bar?
Thanks!
Here is how I changed it. Thanks Sargeras for the help.
self.inputToolbar.contentView.backgroundColor = UIColor.blackColor()
Related
I have read the other posts about the UINavigationBar's Prompt not following the color values of the actual Title. Most of the posts are from the iOS 11 era, and the solutions no longer work on iOS 13.
These are examples of previous posts that no longer have working solutions:
Can't change UINavigationBar prompt color
Change font of prompt in UINavigationController
iPhone: Possible to change the color of just the prompt of the UINavigationBar?
Has anyone else encountered this?
I would suggest the following:
Check that the device is not running in Dark Mode.
Verify that the background-color was not modified anywhere in the code.
Make sure that the style is set to default like in the screenshot below:
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:
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
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)];
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)
I'm a beginner with iOS app development and want to customize the Status Bar colour. I have set my scene to a dark background and I want to battery and time in the Status Bar to match the colour.
At the moment I have added
var navigationBarAppearace = UINavigationBar.appearance()
UIApplication.shared.statusBarStyle = .lightContent
in AppDelegate.swift
Is there a way to add a custom hex colour for the text, not background?
I'm afraid there isn't without accessing private API's, which will get your app declined from apple review.
It's best to just find a way to make your app design work with the given, white or black status bar style.
The one thing you could do is create your own status bar that imitated the UIStatusBar, with your own labels and icons, but that would be a reasonable amount of hassle.
After some search i couldn't find information on how to change notification button background colors. Is this possible to do with Swift in iOS?
Thanks :)
The only thing you can do is to set it to red color. You can achieve it if you set actionButton.destructive equal to true
Rather than creating a custom keyboard...how can I change the ios keyboard background image and get reference of the keyboard button or just the keyboard view programatically?
I do not want to replicate the whole ios keyboard, just tweak the keyboard here and there.
Solution Update:
You cannot update only the background or the buttons of the iOS System Keyboard! This is dues to the reason that Apple has limited the access to the Keyboard API. The most you can do is change the keyboard background color i.e. dark or light.
If you need to change the background to an image like me, you need to extend the ios keyboard i.e. make your own custom keyboard!
Please check below for accepted answer!
Hope this helps!
You can do something like this,
myTextField.keyboardType = UIKeyboardTypeDecimalPad; // many other options
myTextField.keyboardAppearance = UIKeyboardAppearanceDark; //many other options
If you want totally customize keyboard then refer this tutorial.
Hope this will help :)
For dark background you can use
mytextfield.keyboardAppearance = UIKeyboardAppearanceAlert;
For more customisation follow this link:
https://developer.apple.com/library/ios/documentation/UIKit/Reference/UITextInputTraits_Protocol/index.html