viewController edge (sometimes) flickers with white line with animated transition in iOS - ios

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.

Related

UITabBar rendering inconsistently in ios13+

I'm updating an app that I believe I last updated with ios SDK 14. The app still builds and runs but there are number of UI inconsistencies. The tab bar for instance seems to render transparent sometimes and other times not...
Tab bar renders fine for VCs 0 (Dashboard) and 2 (Insights)
But for 1 and 3 I get the following, which I presume is because it is transparent now and lacking a backing view...
If I set the background colour to white, it partly solves the problem but the "shadow image" (ie the separating line) is the missing...
And as you can see I've tried it on a couple simulators as well...
And it's not 100% consistent that the problem is on tabs 1 and 3, though I'd say 95% consistent...
The project is storyboard / autolayout based. Min target version was 12.4 but I've bumped to 13.0. No SwiftUI at the moment. Hoping for a simple solution here...

iOS 11 No background color for status bar in master side of splitview

I have seen a couple of issues similar to this but theirs seemed to be in the main view of their app. I have tried some of their suggestions like deselecting "Safe Area Relieve Margins" in the Size Inspector pane but none have worked. In the Detail side of my iPad app, the background color of my navigation bar stops at the status bar.
In this screenshot, I tried to use MMDrawerController to see if using something other than UISplitViewController would work but I have the same problem for both. So far the only difference between the two libraries is I haven't seen UISplitViewController work at all but with MMDrawerController, if you set openDrawerGestureModeMask to MMOpenDrawerGestureModePanningCenterView and the master view stretches a little bit then the background color renders correctly.
I saw on one of the other post that their issue was a bug for Xcode and there had been several people who already filed their bug Apple. Could this be a separate issue that Apple needs to know about as well if it is a iOS bug?
This is not an issue for iOS 9.X or 10.X, only 11.X.

Strange color in today extension

In iOS 10 I sometimes can notice strange colors of UI elements. You can see that some labels on screen are black. Sometimes UIImageViews are pink or red. I don't set the color of these views, but after 1 or 2 seconds after first loading the color changes and everything is ok.
Ok, it was a bug in iOS because I noticed the same effect with other apps. Nothing can be done by iOS developer to remove this issue.

Screen Shift on UIInterfaceOrientationLandscapeRight

I've got this application mainly displaying photographs.
The app was originally written for iOS 3.1 and upgraded to 4 before beeing published. It was not touched ever since. Now that the owner of the API appied some changes which ain't as compatible as they thought, I am forced to update the app. So I'll have to go for iPhone 5 and 6 and 6+ and iOS 7 and 8 updates in one go.
I observe this behaviour in the simulator of iphone 4, 5 and 6+ dimensions.
Portrait looks fine.
Landscape left looks fine too.
Landscape right is screwed up. Apparently it looks as if the whole screen were shifted to the left.
This is strange because I am not aware of anything that I would do different for landscape right or left. All I am doing is differnicating between any portrait and any landscape orientation.
It worked fine in the old version. But frankly I cannot reproduce this any more because I don't have access to the old xcode and sdk versions. But the app is in store for years and works fine on modern devices and modern OS versions.
A bit more background info, just in case it is of importance:
The app is based on a UITabBar, but it is not visible in this view.
The image is scrollable. It is placed on one view three times of the size of the screen with preceeding and succeeding image views place to the left and right respectively. This view with the three images is placed within a scroll view of the size of the screen or window respectively. This concept still works file, it is just shifted.
When I check the view item's frames in debugger or with NSLog, they all seem to be right, starting at (0.0/0.0) or respectively.
The view on the bottom with the four buttons that navigate to related functions and their view controllers, is re-alligned programmatically on each rotation, as well as the overlays with the textual information. All works as it should but it's shifted in this one orientation.
Well, all views are layouted programmatically on each rotation.
There are no constraints defined.
iOS6/7 deltas are all set to 0.
The app "wants fullscreen". By tapping on the image all UI items disappear and re-appear on the next tab. (Just by setting the .hidden attribute. Except for the navigation bar. Thats managed using setNavigationBarHidden:animated: with YES on animated) Works fine, even in the shifted view.
I am running out of ideas.
While I put all the details together for the question, eventually one idea came to my rescue.
The issue is related to hiding the tab bar. I could not use the regular way of hiding the tab bar because then it would not re-appear when navigating down to the functions that are associated with the buttons on the bottom overlay view.
Therefore I did some sort of hack. I did not hide it regularily but moved the tab bar out of the screen.
AND: This was the only thing that I did differently for landscape right and landscape left. I just searched for the constant names and found it.
Apparently, manipulating the tab bar view had a flaw in older iOS versions. (Or in older SDK versions, I am still working on that important detail)
To overcome the flaw the tab bar view was modified this way for landscape right:
[self.tabBarController.view setFrame:CGRectMake(0-kTabBarHeight,0,width+kTabBarHeight,height)];
This does not seem to make sense but did help me out a lot on similar issues years ago when the app was written.
Now, I changed this to:
[self.tabBarController.view setFrame:CGRectMake(0,0,width+kTabBarHeight,height)];
which is the same for landscape left too.
For the time beeing I separate between iOS versions >= 8.0 and smaller. But I'll double check that with older devices and may get back to this answer later.
I leave the question posted because I found the original "hack" here on SO too, so that I guess that others will have the same issues when updating to ios 8 or SDK 8 respectively.
Thanks for listening.

iOS Black Magnifying Glass

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!

Resources