I have a strange error that show up only on iPad Mini's.
Our application has login screen, which is a UIViewController conforming to the UIScrollView protocol.
When typing in the login details and hitting the login button, the keyboard is dismissed. However on the iPad Mini, when the keyboard is dismissed, there are small moving white lines in the view controller.
It looks almost like screen tearing or a trail left by the keyboard animating out, but it is above where the keyboard was.
I will try to get hold of a screenshot from our tester. This ONLY happens on iPad Mini's.
Is there a special consideration for animations on the mini I am not aware of, when dismissing keyboards? I've been researching this for 2 hours and I can't find anything.
Thanks for everyone's suggestions.
Just to answer this question:
The fuzziness on the image and the artefacts when the images changes position is cause by the fact that the UIImageView which contained the image had different dimensions than the image did.
This would cause the UIImageView to end up on a fractional value pixel after a transform.
As the iPad Mini which had the problem is not a retina device, the OS would then attempt to Anti-alias the UIImageView, which would in turn cause a fuzzy image, and the trails left when the image moves.
The solution was fairly simple, on the XIB file for the controller, select the UIImageView containing the image, then on the 'Editor' menu, select 'Size to Fit Content'.
(Or with the UIImageView selected use the Command + '=' shortcut)
Related
Upvoters: can you let me know if you've seen this problem as well?
The issue I'm seeing occurs roughly every 1 in 15 times when I try to modally launch a view controller from a button on a certain scene.
This is done with iOS 9.2.1 and XCode 7.2, though it is not clear which versions it happens on. It's not easy to change the iOS version down.
The symptoms are as follows:
The destination view controller is not visible on the phone. Instead, the top bar (the one with the carrier) goes black, and sometimes it flickers so the whole screen is completely black. The launching view controller is visible, but not responsive.
When this happens, I go to the XCode screen and do view debugging. Remarkably, this shows the destination screen, almost as it's supposed to look. The only difference is that one of the views has not done its drawRect, and one of the other views looks all speckled. But of course it does not at all correspond to what the phone is showing.
The cancel button on the destination screen seems to still work, because when I press where it's supposed to be, the app continues to function. If I try to relaunch the screen with the button, it again doesn't work though. So once this has happened, the screen has stopped working for that session and the app needs to be killed and restarted.
There are not many hints, but this information may help:
There's 3 scrollviews containing views on the destination screen. All three child views have their own drawRect. It turns out one of the drawRects is not called when the error occurs, resulting in the grey background being shown. The speckled view does run, but I have no clue why it looks like that in view debugging.
No warnings in XCode. Nothing about NSLayout constraints or presentations overlapping.
Two fields are set on the destination view controller on the prepareForSegue function.
The segue is launched from the times button by way of the storyboard. There's no missing or extra outlet, and it is named correctly for the prepare function to catch it.
The issue is sporadic, but will reliably occur if you launch/cancel many times in a row.
Here are the screen grabs. I won't show you the black screen. It's just black with the carrier and the time.
I've solved it. Checking the memory usage turned out to be quite useful.
The grey area was supposed to be filled by a large background with lines drawn. It turns out the naive implementation of drawBackground causes the memory size to balloon to over 200MB. I replaced it with a CSTiledLayer, and now it takes a few MB instead.
I use a Launch Screen (xib) in my app to overcome the problem of the resizeable screen, since i don't always want add Launchscreens everytime, Apple create a new iPhone with a different screen resolution.
In my launchscreen, i placed a UIImageView directly in the center of the view using constraints. The image shows the logo of the company i work for.
The problem is, that sometimes the image is being hidden (mostly after install and first launch) and sometimes it shows (mostly after a view times using it). I'm not quite sure, what the problem is. Is it because at the first-launch-time(s) it has to load many ressources?
Figured out the problem: It seems, that if there isn't enough disc space left on the device, it doesn't show the xib's (Launch-Screen's) Image. iOS at some point clears out some disc-space (i guess from NSLibraryDirectory) and than the images show again.
If this is a major problem to any of your apps, use Launch-Images instead.
I want to make landscape and portrait mode iOS app. I've designed one page with 3 text boxes and 7 buttons. Text boxes and button are resizing (change width) according to IOS screen size in landscape mode but scroller is not showing in landscape mode. So, some buttons are not showing in landscape mode. Please go through landscape Image and portrait Image links.
Landscape Image : http://www.2shared.com/photo/nButg4eb/landscape.html
Portrait Image: http://www.2shared.com/photo/1PR86npE/Portrait.html
I am new in IOS so, i am facing this type of problem. I request all experts to don't close my question because I am really facing this problem and i need to do complete it today.
I am waiting for your valuable answer.
Thanks!
Shailesh Prajapati
First of all, by default scroller is not always visible. It is visible when you enter your view but then it disappears. What is more it is not best, from user experience point of view, to display them all the time.
So, to indicate to user that "somewhere at the bottom there is something" you can do this two things:
after your view was loaded in - (void) viewDidLoad you can blink with scrolls by using:
[scrollView flashScrollIndicators];
and also you can place your buttons, near the bottom edge, in such a way that half of button will be visible and half will not. That will be indicator to user "hey! there is something there!" (http://imgur.com/P9qzUVC)
if this app for ios 6 or later in that case you can use autolayout otherwise it should be manage your code manually. First check is it portrait or landscape and then manage your text field and button manully according to frame.
Read first these two tutorial for autolayout..
http://www.raywenderlich.com/20881/beginning-auto-layout-part-1-of-2
http://www.raywenderlich.com/20897/beginning-auto-layout-part-2-of-2
I found several problems with rotations in ios6 using iPAD...all of us...I resolved mostly all of them using the new method shouldAutorotate and shouldAutorotateToInterfaceOrientation. But in one of the views is not updating properly the rotation. You can see (more or less) what happen:
The top images describes the behaviour from landscape to portrait...if I change the rotation of my app in other different of the first image, and come back to the first tab, the app doesn't update properly the view in portrait.
The bottom images describes what happen when I am comming from portrait to landscape...in the last screen I can the half of the screen completely black.
My level in iOS is really basic I will like some tips...what do you think which could be the problem? because in other tabs is not happen of the same app it is not happen.
If you need a piece of code, let me know...thank you!
Try this:
https://github.com/alexth/TBSV
Sample how to have NavigationBar, TabBar and SplitViewController in one project with correct looking transitions between orienations
Thanks for your reaction (ironic). I've discovered what was the problem with the rotation only in a particular screen of my app. The problem is that the one that built the app before me, used one UISplitViewController inside of a UITabBarController. This mix of ViewController, in iOS 6 bring a bunch of problems, specially with the rotations. After thousands of tries, I found this link and it is solved.
UISplitViewController inside UITabBarController in iOS6:
http://objectiveseesharp.wordpress.com/
That's all.
Should I change the title of the question?
iOS 6 SDK. Xcode 4.5.
Using storyboard and arc. I am making an application that consists of a number of calculators that compute various formulas. On one scene, I'm using 8 UIButtons that have a PNG file as a background image, and they are labelled as different formula categories to allow the user to navigate to 8 different formulas which are contained in 8 different scenes.
I'm using modal segues and am utilizing the [self.presenting dismissViewController] method to dismiss each scene. That all works fine.
On one calculator in particular, I've set up the scene to resemble an actual calculator. I used a UIImageView with a UILabel on top of it to act like a display. Even without code attached to it, when running on my device, I notice that the transition gets hung up when segueing to that scene. I'm not sure why. Also, whenever I hit a button I get a receives memory warning in the console. I'm also showing a leak in instruments.
This app works perfectly in the simulator but not on the actual phone. I'm not sure what's wrong. Could it be my compiler settings? Or is it the fact that I'm not programmatically setting up the button images? Even when there is just a UIImage with a blue picture PNG and a label on top of it, no buttons or a viewcontroller for this view, it still gets hung up.
I'd appreciate any tips or tutorials or just plain tell me what I'm doing wrong lol.
Thanks.
I found out what was wrong. I was using a very high resolution image on each of those buttons. When I replaced it with a low resolution image the memory issue went away