retina-display

Issue with loading and caching retina images for UIImageView animation

前提是你 提交于 2019-12-25 03:52:43
问题 What I have For my game I'm creating several animations using view.animationImages = imagesArray; [view startAnimating]; In my animation helper class I use this - (UIImage *)loadRetinaImageIfAvailable:(NSString *)path { NSString *retinaPath = [[path stringByDeletingLastPathComponent] stringByAppendingPathComponent:[NSString stringWithFormat:@"%@@2x.%@", [[path lastPathComponent] stringByDeletingPathExtension], [path pathExtension]]]; if ([UIScreen mainScreen].scale == 2.0 && [[NSFileManager

Supporting iPad non-retina with retina images only

我与影子孤独终老i 提交于 2019-12-25 03:45:33
问题 I am developing an iPad application and started all my development having in mind the retina resolution (2048x1536). I named all my images without the @2x suffix. The app seems to be working fine in the iPad AND the iPad retina simulator. Do I have to rename all these images to add the @2x suffix and add a copy of all of them without it, and at 1/2 scale? As I see it some automatic scaling is done by itself. Is this ok performance wise? 回答1: It's fine for performance. The big issue, actually,

Mac OS X / Cocoa - disable WebView image scaling on Retina display

ⅰ亾dé卋堺 提交于 2019-12-24 21:18:11
问题 I am using a WebView control in my Cocoa/OS X application to display screenshots. I'm just loading the JPEG image directly to a WebView as a document. It works OK with a non-Retina screen, but in HiDPI mode the WebView is automatically scaling the loaded image up, and that's not what I need. I just need to display it as is, pixel-by-pixel. I've spent half of the day searching the web regarding how to change that WebView behavior easily and for some reason had no success. 来源: https:/

Master list of high PPI mobile screens and how to detect/handle it via CSS?

孤者浪人 提交于 2019-12-24 09:59:07
问题 The iPhone 4's Retina display is double the density of of the iPhone 3, but Apple handled it fairly nicely but just making an assumption and doubling the pixels when rendering (so that your web page looks the same physical size on each device). You can then use some webkit media queries to load additional CSS just for that device (-webkit-min-device-pixel-ratio:2). The question: Is there a resource that a) lists the other mobile devices that are now using high PPI screens b) what the device

Save space: Batch resize down all @2x images for old iPhones/iPads/iPods on first launch

元气小坏坏 提交于 2019-12-24 09:46:10
问题 The issue with this: iphone 4 - loading images x old devices is that we end up filling our apps with double content. Ie a user has to download both the 2x size and the 1x sized image to his device, but will eventually only use one of them and the other one will be a waste of download time etc. So I thought, in some cases it could be okay with just filling your app with the high res images (@2x), and on app launch (in the app delegate, before displaying the window... or something), you could

What is the point of the @2x for Retina display apps?

老子叫甜甜 提交于 2019-12-24 08:10:00
问题 I understand that the Retina display has 2x as many pixels as the non retina displays, but what is difference between using the @2x version and taking and taking the 512 x 512 image and constraining it via the size of the frame ? To Clarify: if I have a button that is 72 x 72 The proper way to display that on an iPhone is to have a image.png = 72x72 image@2x.png = 144 x 144 <---Fixed :) TY But why not just use 1 image: image.png = 512x512 and do something like this: UIImageView *myImage = [

iOS - Video resolution on retina display?

纵饮孤独 提交于 2019-12-24 04:31:39
问题 I am embedding local, short videos inside my app. The size of the video (width and height) are predefined to fit the view they will be played in. Edited Let say I have a video 800 height & 650 width. I want to display it in the iPhone on a 400 * 325 view, so i resize it to this size. Should I make an other version of 800 * 640 for the retina iPhone? What are the rules for video resolution on retina display deices? will I benefit a better video on retina if I will double the resolution? Thanks

iOS - Video resolution on retina display?

陌路散爱 提交于 2019-12-24 04:31:05
问题 I am embedding local, short videos inside my app. The size of the video (width and height) are predefined to fit the view they will be played in. Edited Let say I have a video 800 height & 650 width. I want to display it in the iPhone on a 400 * 325 view, so i resize it to this size. Should I make an other version of 800 * 640 for the retina iPhone? What are the rules for video resolution on retina display deices? will I benefit a better video on retina if I will double the resolution? Thanks

Is a copy of a high res and standard res required for iPhone?

时间秒杀一切 提交于 2019-12-24 01:16:50
问题 Wondering if both a high res and low res image are required for iPhone Apps. Having a duplicate copy increases file size which is something I need to cut down. I've built apps in the past and only used high res, without @2x appended to the file name. The apps look great on Low res and High res devices. so... Let me know 回答1: It is not required to have both image types. However, since the resolution is different for the Retina display you might build a Default image that looks nice on the

Must I multiply the scale with the point values for retina display, in this case?

半世苍凉 提交于 2019-12-23 12:07:17
问题 Since the retina display, suddenly this piece of drawing code seems to not work anymore. The drawn image is slightly offset than it was before and appears somewhat stretched. I am drawing something in the -drawRect: method of an UIControl subclass. I figured out that the current scale inside that UIControl indeed is 2.0. This code obtains an CGImage from an UIImage, which probably won't know anything about the scale. It's feeded as parameter to an method that also takes some point values