iOS 7 Keyboard color flash - iphone

In iOS7, I set the keyboard for my UITextField in Interface builder to the dark style, however, whenever I click on the textField the keyboard initially shows as light for a fraction of a second before turning to the dark style, how can I have it not do this?

This is a bug in iOS 7. I have been dealing with the same issue. It has been fixed in iOS 7. I tested in iOS 7 beta 3 today.

I had the same issue. It seems as though it only happens the first time the keyboard appears after an app has been suspended, and then resumed.
I was never able to directly resolve the issue, but in my case, I was able to find a workaround. Specifically, my issue was with a passcode screen, which needed to appear after resume. Every time the keyboard was shown on the passcode screen, it would start as light colored and then flash to dark halfway through the animation.
I got around this by making my keyboard become the first responder when the suspend event was received, instead of resume.
May not help you, but thought I would share my workaround.

Another bug in iOS 7 in seems, a restart of the device fixes it temporarily.
Funnily, this issue does not occur in other apps that use the dark keyboard! Who knows!

I found that setting autocorrectionType property to UITextAutocorrectionTypeNo resolves this issue!
self.myTextField.autocorrectionType = UITextAutocorrectionTypeNo;

Related

UIButton has strange unexpected bakground color on different device

I've recently been building an app under iOS 15 (latest as of writing this code), and when I shipped a version of my app to test flight, one of my users sent me a video of the app working, and I noticed, all of my buttons have this strange background highlight effect. Is this some sort of accessibility mode? I've never seen this happen before. In included some screenshots below and the interface builder, there are no custom classes associated to this UIButton. And ALL of the buttons have this effect happening to them.
This other device has a strange background color attached:
But this is how its designed and how it shows up on my device and the simulator:
Here is a screenshot from Interface Builder:
I had a similar problem.
Change the style to default.
And then instead of the tint color, choose the text color.
The background can remain default.. and is therefore transparency.
Tested, works.
Example
Turns out my user had something in iOS accessibility settings turned on, called "Button Shapes". I had no idea...

No button events in iphone 5 simulator

When I test my app running in the iPhone 6 simulator everything works as expected. If I however test it in the iPhone 5 or iPhone 5.1 simulators, I can't seem to get button events fired. Im using Xcode 4.5.2, not using storyboards and I have made tests with simple buttons with actions like:
- (IBAction)test:(id)sender {
NSLog(#"YEES");
}
And the actions is connected using drag and drop in the interface builder. I just can't seem to get it fired.. Do you have any idea about what could be the problem?
Update Jan 18:
If I do a "normal" click on a button in the iPhone 5/5.1 simulator nothing happens. If I do a bit "slow" click on a button the button will be "pressed"/selected. If I do a "really slow" click, like holding the button down for 3 seconds I get the button click event! How is this possible??
I found a solution for my case - i added UITapGestureRecognizer to the container UIView, and it intercepts events before UIButtons, and need some time to fail before buttons can handle tap... But it strange that in iOS 6 all works fine
To avoid this we can simply call:
[tapRecognizer setCancelsTouchesInView:NO];
I really suspect this could be the issue of view overlapping.
Please color your views that you are using on the view controllers and check whether any of your view is overlapping your button or not
I had a similar issue with an iPhone 5s simulator. Through trial and error I realized that the button's height in the simulator was 0 or otherwise a small number... The first clue to that was that when I changed its background color - the background did not show in the simulator (on larger simulators, like 6 or 6 plus, it showed as a thin line instead of full height). Then when I added a height constraint, it started accepting click events. That helped me identify the issue, but it was not the solution I was looking for. Initially I laid the button out without size constraints, so it's actual size should have been determined by it's intrinsic size. So instead of the height constraint, I changed the vertical compression resistance of the button to "required". That fixed the issue.

iOS Simulator v5.1 window is missing device frame and Home Button

Is there a way to revert the look & feel of iOS Simulator window back to how it used to look in 5.0 and older versions?
P.S. I know Cmd-Shift-H shortcut for Home Button.
For anyone who comes here with this problem, but does not read the comments, you can get it back by hitting CMD-1 (as noted above), but it will only show for the full size emulation, if you want it zoomed out, it goes away.
then you have to use the shift-cmd-H to click the home button. And you can do it twice to simulate the click-click to show running apps, and then close them. (Don't press and hold tho, that will just trigger it to keep opening/closing the running apps window)
If you have a Retina Display macbook, you must set set the display to the highest resolution to see the iPad/iPad Retina frame on the simulator.
Hope this helps someone out!
You have to Choose Hardware > iPhone, and THEN hit Command + 1...I'm surprised nowhere else was this posted in this order. Happy Coding!
I had the same issue with a previous SDK and I had to reinstall the SDK in order to have the frame back again (I needed it for some screen shots).
So I am almost sure that it is not related to the retina resolution.
Unfortunately it is not possible to bring back device frame around display - I believe it's because of necessity to save up display space when simulating iPad's retina display. Maybe some day, when MBP, MBA and other Apple's machines will have retina displays, device frame will be back ;)
Note: if someone proves me wrong and we can have device frame, I'll of course mark his/her answer as correct one :)
This page explain it all:
http://iphonedev.tv/blog/2014/2/25/xcode-fix-show-the-iphone-simulator-skin-on-a-retina-display
Option 1: Turn Off Scaling
If you scale the size of the iPhone simulator to 50% or 75% the skin will not display.
Option 2: Get a Retina Display
No retina display, no iphone frame
Just hitting CMD-1 didn't work for me, nothing happened.
However, after switching repeatedly between CMD-1, CMD-2 and CMD-3 in a quick manner, all of a sudden I got the frame back! Hope it helps others!

Tap to focus on camera apps, Supposedly not possible, but a bug in my app enables it (although useless)

I would like to get tap to focus in my app and the controls are hidden
Supposedly this is impossible but I know its not. I have a simple iAD dragged into an overlay, no code or anything. When I click on the iAD nothing. but when I close it with the home button I get a modal exit of the nonexistant iAD and the camera apps relaunches but in the top left with only a small portion viewable. But this time the tap to focus is enabled.
So how can I do this without the bug?
Thanks!
Guess no one got it? I just showed the controls to take a snap and zoom and focus came up!

All the UILabels in my UITableViewCell sometimes have a black background color

This happens like once every 100 times I open my app.
Normally all the UILabel work fine and have a white background.
But every once in a while, the app opens and they all have a black background.
Then it's black on black text and you can't read anything.
I've tried setting the backgroundColor to white or clearColor.  Doesn't seem to affect this when it happens.
It's very strange that a bug like this only happens 1 in every 100 times. But I'm guessing this is in the simulator? If it doesn't happen on your device, it might be not worth worrying about too much. This especially goes if you're using the 2.2.x simulator with Xcode using the 3.0 SDK. I personally get crashes with the 2.2.1 simulator sometimes, and after Googling a bit, found out it seems to be a pretty common problem. So I just use the 3.0 simulator when that happens.
Otherwise, the only thing I can think of is the opaque setting on the UITableViewCell.