baker icon indicating copy to clipboard operation
baker copied to clipboard

Baker on iOS 5.1 and iPad Retina display

Open tstegart opened this issue 14 years ago • 8 comments

Has anyone updated their SDK (not their iPad, the SDK) to use 5.1. Are there any issues with Baker?

Secondly, are there any plans for how Baker will handle the retina display? I know the launch images can be easily updated, but I'm worried about designs that mix text and graphics. Can Baker on a retina display just use a different book.json file and we can design totally different webpages that load for when that device type in used?

Lastly, does anyone know what a bBaker app looks like on the retina display? If someone has examples of screenshots, I would very much appreciate it.

tstegart avatar Mar 17 '12 19:03 tstegart

We should be able to test on Retina soon, so the next version will be 5.1 compliant.

In theory, there should be no problem: Baker doesn't have any custom UI component right now and as such will not require any additional work (maybe in the upcoming 3.1 with the navigator, but that's all). Everything is UIWebView, and as such you will use the same techniques you can use to support Retina on the web.

There are various techniques, the most basic one is using media queries like you'd do to switch from iPhone to iPad. The media query parameter is min-device-pixel-ratio:

-webkit-min-device-pixel-ratio: 2

Check for example this tutorial: http://flowz.com/2010/07/css-image-replacement-for-iphone-4-high-dpi-retina-display/

folletto avatar Mar 17 '12 21:03 folletto

Thanks. I might write a wiki entry on this to help people out. We're launching this week so it will have to wait a week or two. By the way, some sites suggest that because the pixel ratio is just double, the best way to handle this is to only include the retina image in your app and then scale down the image by 50% for the non-retina iPads. Do you agree?

tstegart avatar Mar 18 '12 00:03 tstegart

In theory, yes. I never tried it out extensively however to confirm it 100%. On the positive side, since Baker doesn't have a bandwidth limit once the book is downloaded, it's better to include only the high-res image. :)

folletto avatar Mar 18 '12 15:03 folletto

When I wrote the original post I was really thinking only about images, and now I've put some more thought in I'm starting to get worried about text too. I just realized, if our magazine uses the same css file as the Baker example app which sets the main column of text to a certain width (about 540 I think), does that mean it will display at that width on the new iPad? Somehow I expected it to double automatically, but now I wonder. A 540 px width on a retina display will be very small, the columns will be too skinny. Will the whole CSS file have to be redone?

tstegart avatar Mar 19 '12 17:03 tstegart

No. Apple's solutions is very clever, because you don't have to change anything. It will just work. Images as well: they will just work. You need to update images only if you want to use retina double resolution, but if you are fine by having the same definition as the old iPad, then you don't have to change a thing.

Nobody had to rebuild whole websites when the iPhone 4 came out, right? ;)

This solution is very clever, unfortunately it creates just one side effect: "1px" in the CSS doesn't anymore mean a real pixel, because on Retina display it will be effectively rendered as 2 pixels. However, once you understand this, everything goes smoothly. :)

folletto avatar Mar 19 '12 17:03 folletto

Ok, whew! We're a few days from launch and that was starting to freak me out. :)

tstegart avatar Mar 19 '12 18:03 tstegart

Baker current master is now Retina compatible, iOS 5.1 and iPad 3 tested. :)

folletto avatar Mar 20 '12 00:03 folletto

Awesome! Thanks a lot guys.

tstegart avatar Mar 20 '12 00:03 tstegart