Tinting the Keyboard InputAccessoryView of a UIWebView - ios

I've got a UIWebView in the app I'm currently working on. It looks fine on iOS7 but in iOS6, I'm getting an ugly tint on the in-built inputAccessoryView when the user gives a textfield focus... Show this screenshot
Is anyone aware of where I can set the tint here? The UIWebView in Interface Builder does give me a tint option but it doesn't seem to do anything. Any insight as to how iOS decides upon the tint color to use here would be interesting too.

Related

Main.storyboard is pitch black

I've been coding in Xcode for a long time but I've never used the storyboard. When I opened it up I got this pitch-black.
Does any one know how to fix this ?
A lot can cause a black screen. I think, most likely, you are currently previewing dark mode. You can switch back to light mode by clicking View as and changing the appearance.
Or, the background color of the view might be set to black (probably not the case though). You can change this in the attributes inspector.
Black color
System background color
System Background Color is white in light mode, and black in dark mode.
And there's always the possibility that Xcode is glitching. In that case, quit and relaunch.
For me, I had a datepicker set to inline mode, and it messed things up. I'd try and recall if you did anything that Xcode didn't like before it went black, and try and reverse that.

iOS UIAlertController Dark Theme

I'm working on an app for iOS with a dark theme and I want to use a UIAlertController. However, the white alert looks out of place. Would it be against the Human Interface Guidelines even on a dark themed app to use a dark themed UIAlertController (when I say dark themed alert all I mean is switching the white background to a dark grey and the text to white this also includes the buttons).
Assuming it's not against the guidelines how would I go about achieving this? I can't seem to find a theme for the UIAlertController that would allow this.
With iOS 13, Apple provides Dark Mode. But if your App theme doesn't match with Device Theme, you can set your view controller's theme.
For eg, My Device Appearance is Dark Mode, and my App is always in light mode. But the popups using UIAlertController are following Device Theme, Dark theme, and a black popup over my white screen doesn't match.
Solution #1: Inline Solution
While creating the UIAlertController, I can set its theme
alert.overrideUserInterfaceStyle = UIUserInterfaceStyleLight;
Solution #2: Support for Whole App
In you AppDelegate, set the theme for window
self.window.overrideUserInterfaceStyle = UIUserInterfaceStyleLight;
This will cause all the popups to use light theme.
Note: UIAlertView won't use the dark/light theme if you set its overrideUserInterfaceStyle property.
Also, don't forget to add if #available(iOS 13.0, *) check before setting the property, as it is available only in iOS 13+
Well, customizing UIAlertView/UIAlertController is not possible, but there's a plenty of custom Alert implementations on CocoaControls, just take a look there. It's more a philosophical question; I guess it doesn't really violate anything.

UITabBar's font distorts or gets squished after opening up a UIImagePickerController and returning back to view

I am having a very strange thing happen with my iOS application wherein the font appears normal on my UITabBarButtons initially, but once I open up a modal dialog and close it, the tab bar buttons label's appear squished together. This happens when I open up either a UIImagePickerController or a custom modal dialog. I am consistently able to reproduce this issue. I even used a program called Reveal to see what's happening with the UITabBarButtons and the label inside of them, but I cannot see any difference in the view's before and after properties. I am compiling this for the latest release of iOS 7. I can reproduce this both in the simulator and on the device. Any help would be appreciated.
[urtabbar setContentMode:UIViewContentModeScaleAspectFill];
I had a similar problem. In my custom "CustomTabBarController" with a UITabBar I had to call [self.view layoutIfNeeded]; in the ViewDidLoad. This seemed to have fixed the squished text.

iOS 7 UISearchDisplayController not cleaning background when search data

I'm upgrading my Apps to iOS 7. Actually I have a big issue with UISearchDisplayController.
If i display it into a PopUp until I don't start a Search it works fine, but when I insert something into the SearchBar the search works fine, but I see the search result overlapped to the old contents.
In iOS 6 it all works fine. Here is a link to an example project which shows the problem.
Example project
Attached to this post there are two images.
Thank you for your help.
Seems like the cell's background color is clear color, and so is the table view's. You can either implement the search display controller's delegate method searchDisplayController:didLoadSearchResultsTableView: and set the background color to what you need (but not [UIColor clearColor]). Or change your cells' background color to be an opaque color.

Loosing tint in iPad app after splitter popup activated

I have applied a brown tint to the app. When I select the popup then switch back to landscape view, the app goes back to the default tint. Is there a way to stop that.
here's a few screen shots in order:
1: looks good
2: Activate popup
3: Looses tint, reverts to default
This is a bug. I've been following this issue for a very long time. It started out as a problem described in this question which apple attempted to fix in iOS 4.2. Unfortunately they didn't fix it properly and now we the behaviour you see above. I reported this to Apple and all I know is that it is a duplicate of bug 8594881. I do not know of any workarounds at this time either.

Resources