In order to have columns in an iOSTable, pending the arrival of a real listbox at an indeterminate date, I have used the image property of iOSTableCellData.
The problem is that at 72 dpi, the characters appear blurry, since today all iOS devices are at least 144 dpi, and even 216 for some.
See attached project that contrasts the result between graphics at 72 dpi and fonts used in labels.
All devices use at least 144dpi, it is not the same as the Mac OS X world, where Retina support can be considered a luxury. With only 72 dpi, Xojo iOS is appearing really backward on iOS, and merits to support the standard resolution.
There are still some non retina devices that support iOS 7, though. So it would seem necessary to have a property that sets the graphics resolution.
iOSGraphics and iOSPicture support this just fine. The trick is that you need to create your iOSPicture with the correct pixel dimensions and scale value.
[quote=177693:@Michel Bujardet]I had not got that when I looked at the constructor. I redid my project with scale 2, and now the rendition is very close to regular fonts.
Thank you.[/quote]
When creating an iOSBitmap you intend to put on screen, you want your bitmap to have the same scale factor as the screen and the number of pixels in each dimension multiplied by the scale factor.
Now that I exprienced the “blurries”, I understand better some posts about the lack of Retina support in the IDE. I guess this will come eventually to Desktop ?
Something will come to the desktop, though not this exact API. The desktop is a bit more complicated in that a window can be moved between displays with different scale factors at runtime.
I did not think about that. Indeed it is an interesting case to see an additional standard monitor 72 dpi attached to a 144 dpi Retina MacBook. And a window seatting on both…
Yep, got that. And I’ve got @2x and @3x images throughout my app. But what I mean is, how do I know within Xojo whether my user is on a 1x, 2x or 3x scale device?
Thanks Paul, that seems to work for me. Maybe the scale should be an intrinsic property and/or the constructors with a scale parameter should default to the current scale because it seems so important to create iOSBitmaps/iOSGraphics at the right scale?
@Paul Lefebvre while this code from the declare page of the docs returns the value of 2 in my iPhone 6 Simulator, on my actual iPhone 6 device it returns 0.
Is there a declare guru who might like to step up to take a look at this code?
You need to have two declares, one which returns a single for 32 bit and another which returns a double for 64. Then use #if/#endif to select the correct one when compiling. This is why we need a float type
Hi Paul,
The link to the declare page that shows the scale factor doesn’t show the info. It tried searching but couldn’t come up with it, can you help?