I've been working on an iOS application and I came a cross with a bizarre behaviour.
This happens in iPhone 4 and 4S (I've not been able to test in iPhone 5 or 5S) but doesn't happen in the emulator or others apps in the same device. The interface is native (it's not a webapp).
Have anyone came across with this black spot?
EDIT: It happens in every TextField (secure or not)
I had the same issue, and just solved it for myself.
In my app, I'm presenting different modes of my app in different UIWindows, which involves creating different windows and changing which window is key and visible.
The text fields with the black eyeglass showing up were in a certain window, whose windowLevel = UIWindowLevelNormal.
Changing my keyWindow's windowLevel did the trick for me:
keyWindow.windowLevel = UIWindowLevelNormal + 0.1;
Voila somehow it's working... I hope this helps!
Related
Device: Physical iPhone X (16.0.2)
A legacy app (Objective C) of my client has worked just fine on iOS 15. On iOS 16 though, the app has suddenly 'shrunken in height'. The app opens as usual but on the top and bottom of the screen, there are black bars, as the app itself seems to be constrained to a certain size.
After some investigation, I found out that the device actually reports its Screen Height to be 480pt (iPhone X). Forcing the UIWindow to have a different size doesn't solve the issue, the app is still constrained to be the same wrong height. It seems the device 'actually believes' to be shorter than it is.
Since this behavior kind of resembles what happens when starting an iPhone app on an iPad (at least I remember seeing something like that some time ago), I was wondering whether or not this behavior is expected as of iOS 16?
If not, I would really appreciate some help here.
EDIT: I learned that +[UIScreen mainScreen] is deprecated as of iOS 16 so using that to initialize the window might be the issue. Though there seems to be no alternative for accessing this info all the way back in the AppDelegate. It was suggested to use self.view.window.windowScene.screen for reading a device's screen size, but sadly this is not accessible in the AppDelegate.
WORKAROUND:
I was not able to find the root cause of the issue but could resolve it by using storyboards to load the initial ViewController. This caused the system to automatically create a window, which was not affected by this weird system behavior.
Just updated to Xcode 13 and Visualstudio Mac to 8.10.10. Since then my app:
Wont display the splash screen.
The app is cropped at top and bottom.
Ui is acting generally weird.
Now I have read old threads on similar problems and adding the Launch screen interface file base name. in the info.plist file does make the app cover the whole screen.
I have tried switching splash screens and change location. But it's just black. I don't use a storyboard for the splash and instead provide several different resolutions, which have worked fine for several years.
The UI is glitching like the loader picture, and several different ui elements where colors are provided are "cut" in the middle showing two colors when it should switch.
I have read the release notes for xcode13 but haven't found anything related that would break the whole UI.
The interface glitching and no splash screen I can't seem to find a solution for. Everything worked fine before the update.
What could be the problem? Some setting in the info.plist, a checkbox in the storyboard?
I'm still new to Xamarin and iOS development and greatly accept suggestions.
Let me know if I can clarify anything.
Thanks
iOS load glitch picture
According to your statement, you are not using a storyboard, so you need to replace the Launch Screen with a LaunchImage, then check the LaunchImage file (if it does not exist, you need to create it yourself) and add all strictly standardized pictures inside.
I just recognized that I can see thru the iOS Simulator if an UIView is defined with (semi-) transparent content. But I can not make a screenshot of it, on the screenshot the effect is gone.
The (custom) navigation bar on top has alpha set to CGFloat(0.9).
Here a screenshot taken with an iPhone 6:
Zoom in and you can see thru the simulator window on Xcode. I assume this is a bug, or is it intended behavior of the OS X transparency effects? If it is intended, can I turn it off?
Ok, I have found the problem. Actually it is not a transparency effect but a display problem. I am using an iMac 27inch with an IPS LCD display, which suffers heavily from "screen burning". Xcode is standing on this position for hours so it burned in into the display. That's why I can not make a screenshot - it is a hardware problem.
https://discussions.apple.com/thread/5255653?tstart=0
Yeah this is going to be a hardware / screen problem. Should not translate to your app.
I would like to make screenshots of my app in IOS-Simulator. This works fine with CMD-S, but I have always black parts in my screen, because the windows is not autosized to the simulated devices screensize.
Is there a way to autosize the window to fit with the screensize of the simulator ?
Screenshot:
The white part is the content of the device. The black is obsolete and is a window from the MAC. When taking the screenshot from this, I still have to cut out the content to have a good screenshot.
This used to happen in earlier to iOS SDKS when you don't set a launch images for all devices.
In your case, I think you don't have the launch screen file set. this can be solved by setting that file at general section in the target's settings.
Alternatively, set launch screen images for all devices.
Check my answer here.
One more thing to try: At the top bar in simulator. choose the
Window menu then Scale and play with those values.
I solved it the following way, but I don't know what was the reason.
I removed the launchscreen as hasan83 suggested. This did not the trick yet.
I restarted the MAC
I started XCode ("Xcode"->"Open Developer Tools"->"IOS Simulator")
I started the ios simulator without starting my app. -> MAC-Windows fit with the simulated device screen
I started my app and now it looks as intended.
Thanks for helping to all involved people !
I have a native iOS app written in objective-C (Xcode5) that shows a weird artifact on the top-left border of a subview during a standard animated transition. This artifact consists of a flickering white line that lasts very shortly (less than a second, but can still be clearly noticed) and that does not occurr always (more or less 3 times on 10, when pushing exactly the same button).
Here is an example of how it looks like:
I could see this artifact with 4 different devices (iPhone 5S, 5, 4 and iPad Mini) with iOS 7.1 installed. I tried also to close all the apps in background and restart the devices, but the artifact is still there.
I tried by setting clipsToBounds to YES as suggested in another answer, but it didn't work for me.
Could this be a bug of iOS7? The white flickering line doesn't appear sistematically on every transition, but just sometimes. In the app I'm simply calling a pushViewController animated:YES, therefore the transition is completely handled by iOS.
Any suggestion or ideas?
Try to implement the animation on main thread, this may solve the problem.