I'm new to iOS development and when I run the code for Connect the UI to Code I see the top of the text field is clipped:
I've checked the constraints, which all look fine (best I can tell).
Update: Answer
From my answer below: "Aha: The cause was that I had scaled the Simulator to 50%. There is no clipping at 75% or 100%."
Update: Blended Layers screen shot
Here's the screen shot with "Debug > Color Blended Layers" on (great tip!):
Aha: The cause was that I had scaled the Simulator to 50%. There is no clipping at 75% or 100%.
looks like the "meal name" label is place on top of the text field and overlaps it
use the Debug->"Color Blended Layers " option for simulator to see its positioning
Related
I'm having issues with constraints in XCode 12: Even if I describe accurately all measures involved, there is no way apparently to resize a 850x600 image to make it fit proportionally in the screen of an apple device. As you can see in the image, the constraints are defined to make the original image fit WITH BORDERS on the Iphone's screen, but nevertheless is turns out to be a disaster afterwards...
As you can see in the screen capture, the image overflows the screen when the model device is changed. So...we have a problem. And the answer or clue that I'm seeking night and day is...
How to make this image to become RESPONSIVE to screen size, and keep it's proportions. No way how the hell something so basic is so difficult in XCode...
must edit... look how the alignment constrainst are shown in grey...no idea why...this avoids me to try the solution provided by the good fellow above...
It seems you've defined constraints to center the imageView and having it a size of 850x600 pixels. This will keep the image of that exact same size, regardless the device it is shown on.
If you want the image to shrink, keeping the aspect ration you need to define constraint for the top, bottom, leading and trailing edge.
And you need to set the imageView's contentMode to "Aspect Fit", which is the default, afaik.
This is an image shown on an iPhone 11:
And this the same image shown on an iPhone 4s:
Edit:
One way to add those constraints is to select (highlight) the imageView and click on the button with the little square in the middle surrounded by those "T"s. :-)
I have implemented a gauge chart and overall it is working great. When testing on an iPhone it has a white "segment" appearing at the start of the animated line - this does not appear at a consistent time, and it does change in shape depending on how far through the animation is when appearing.
Wondering if anyone can confirm how to fix - I have tried everything I can to resolve.
Screenshot of iPhone with Gauge loading
My problem is that my application's icon seems to be resized to fit the rounded-corner mask applied when displayed on the home screen.
EDIT: Here's the image:
My image follows the guidelines in these locations (mainly that it is 120x120, and doesn't have pre-rounded corners):
https://developer.apple.com/library/ios/qa/qa1686/_index.html
https://developer.apple.com/library/ios/documentation/iphone/conceptual/iphoneosprogrammingguide/App-RelatedResources/App-RelatedResources.html#//apple_ref/doc/uid/TP40007072-CH6-SW4
I've tried:
1) Using an image catalog
2) Searching for the issue on this site. I looked through the first 5 paginations sorted by newest and can't find anyone who's had the issue...
3) Making sure that the image is specified in the info.plist
4) Checking the troubleshooting app icon issues on the apple developer site.
The icon always ends up drawn with the black edges.
Is there a way to programmatically make sure the mask is applied correctly?
Has someone else encountered the same issue?
It sounds like you might have the wrong DPI set in the icon PNG—if it’s something other than 72 (the screen’s nominal DPI in points), the system may be trying to scale it to match.
It looks like the DPI was correct. The problem was that there was a transparent background layer, wider than the image that Android Studio seemed to have added when it was run through that deployment process. The layer went unnoticed in preview because it doesn't highlight the transparency. Noticed it when I opened it in GIMP.
So it was a silly oversight on my part.
I am facing the problem with the App Icon on the iOS 7 Device, the Problem is : I am getting a black border on the top corner of the icon. The Icon size & Name i used is:
Size : 120 X 120 pixels
Name : Icon-60#2x.png
(Sorry, I can't post the screen shot/Image here as i need 10 reputation points to post an image. Hope you guys understands)
Please help me.
Thanks in Advance !
EDIT:
iOS HIG guidelines suggest,
Avoid transparency. An app icon should be opaque. If the icon’s boundaries are smaller than the recommended sizes—or you use transparency to create “see-through” areas—the resulting icon can appear to float on a black background, which tends to look especially unattractive on the beautiful wallpapers that users choose.
Check if there is any transparency present in the icon, if yes, please remove it.
You should avoid rounded corner icon, because Apple applies masks to your icon image for this. Provide a sqaure-ish icon of dimensions 120x120 pixels.
Hope that helps!
For iPhone and iPod touch, both of these sizes are required:
120 x 120 pixels
60 x 60 pixels (standard resolution)
Reference by apple doc
I've faced same issue like this. I'd provided image with rounded corner. When I provide flat image with this size, I'll see correct icon. Seems to be silly. But It has work.
Please try these steps
STEP 1:Remove the transparency of app icon.
STEP 2:Add square images. Images with rounded corners also make this issue
I have designed an interface in a NIB which has two UILabels. The labels are in close proximity to highlight one particular word in a different colour.
The issue is that on a non retina display the two labels render as desired. See Image 1:
However on a retina display the label for the white text overlaps some of the blue text. See Image 2:
Note that the frame of the white text label doesn't seem to have moved rather the issue seems to be the word wrap on the blue text label.
Has anyone seen this before and figured out a quick/ painless cure?
Posting as an answer as requested:
This looks like a possible bug or edge case with the larger label's size. If you widen it by a single point, it may wrap correctly on both devices. It may be worth reporting this as a bug, since the objects should behave identically on retina and non-retina devices.
This will be a non-issue for you in iOS 6, anyway :)