The default row height fits four rows exactly into the 42mm Watch. But on the 38mm Watch, the fourth row is cut off.
In IB I have the generic "Installed" checked for the Table; for Images (e.g.) this leads to customizing sizes but I don't see any such option for Table row height. Or would I just use what looks like Watch Size Classes, clicking down at the bottom where it says "Any Screen Size"? If so, how would that interact with the "Installed" settings?
I am going to hack around, but some SmartPerson™ could help a lot by pointing in the right direction.
FWIW, all the Apple sample code I've seen has the "38mm cutoff" problem too.
Why the rows are cut off
The row heights are intentionally the same, for a couple of reasons.
While I don't see a minimum row height mentioned in the design guide, shorter rows would make it harder to target the right row on the 38mm screen. This would lead to an inconsistent user experience between the two watch sizes.
A shorter row would lead to the issue of vertically clipping two-line text, which would occur more often on the 38mm screen since the rows are narrower.
This example illustrates how the last row's WKInterfaceLabel text descender gets clipped by its group once you reduce the group height for a 38mm screen to fit 4 rows on the screen.
The shorter row also leads to an insufficient amount of (vertical) white space around the text, making it harder to read rows of content.
Consistent row heights are no different than how some iPhone models can fit more rows per screen compared to some of the smaller-screened devices. Apple doesn't modify the iOS row height to fit the same number of rows on the smaller screen, as could fit on the larger screen. Their watchOS sample code is really consistent with their general design philosophies.
How to accomplish what you ask
You can change the group's height from Default to Fixed, and specify a smaller height (of 34 points) for the 38mm device. This would fit 4 rows on the smaller screen, as illustrated by the previous screen shot:
You should adjust your content as necessary to preserve vertical white space between the content and its group container.
Related
The image shows a 3x3 grid which is a vertical stackview, which contains 3 horizontal stackviews, which contain 3 buttons each. The top horizontal stackview has a correctly sized set of numbers within it(just by setting the font size to 80). The other two do not.
I want the numbers to take up the same amount of space on all devices so every number on each button is the same relative size on every device. This must be done programmatically! Not in IB... I cant find much info on this topic so even a link would be helpful please.
The text below the app icon isn't fully showing, you can see 9 characters out of the 12, is there any way to alter this making it all fit or maybe have two lines instead of one?
No
You can neither change the font size, the letter spacing or number of lines. They all are pretty much fixed.
It is your annoying job to find a app name that fits on all devices in the little space that is available.
Note that the font is not mono-spaced, meaning that all character take up different amount of space - you are going to be able to fit a lot more Is on the screen than Ws or Ms
I am trying raise the height of the ranked successive views. There is a certain distance between each of these views.(Vertical spaces)When I increase the height of one of them, distorted distance between the bottom. I can not align all elements under one single at a time. This event is automatically done on Android. How do I make this operation on iOS.
That is the problem
I'm having trouble setting up constraints.
This is the thing I am trying to achieve:
I have 2 objects A and B. I want there there to be a maximum of 100 points between A and B if its a larger screen, or less if its a smaller screen.
Also, I want there to be a minimum of a 20 point margin from the main view controller. So on a smaller screen the minimum spacing will be 20 points, and on a larger screen the margin can be as wide as needs in order to satisfy the space between A and B at 100 points.
To illustrate how I want it to look on various screens:
4 inch screen
I want there to be a 20 point margin on either side and the middle (space between A and B) can be variable, i.e. 100 or less.
5.5 inch screen
The margins can be variable and expand as large as they need to, but the middle section (space between A and B) can be a maximum of 100.
Any help how to achieve this would be greatly appreciated.
This can be achieved with help from three dummy views and two width constrains with different priorities. I set up a test project to test my thought. check it out to see whether it's what you needed
https://github.com/dopcn/testSeg
I'm setting up a collection view and customizing its cell's width, inset, and inter-item spacing. With the current size that means there would be two columns in portrait and three in landscape. I let flow layout do the rotation adjustments & calculations, but the result is a stretched middle column. I think what is happening is flow layout is doing the math for the cell padding/spacing and not getting clean whole numbers. Then it adjusts the size of the actual cell by half a point. The result is an aliased & blurry looking cell.
I'm had this issue multiple times and each time - I manually calculate the values for each orientation to come out as a clean whole number. While this works, it doesn't seem very efficient. I'm wondering if there is a better way to do this, and if FlowLayout has the ability to say, give that half point to a margin or the empty space between the cells?