retina-display

iOS Retina display: images double size

拟墨画扇 提交于 2019-12-03 20:42:50
For testing not/retina display I've created an UIView with size 100x100. I've create 2 images: - normal size (100x100) - retina size (200x200) I have two situations: 1) Non-Retina display + Normal Size image in background 2) Retina display + Retina Size image in background The 1st scenario is ok. In the 2nd scenario the image is double size and in my UIView I can see only 1/4 of the total image. The same happens when I try to assign a background image to my UIViewController navigation bar as following: if (IS_RETINA()) { [self.navigationController.navigationBar setBackgroundImage:[UIImage

Reduce the Xcode Simulator (Retina 4 inch)

 ̄綄美尐妖づ 提交于 2019-12-03 18:49:14
问题 I'm using macbook Air and using the iphone Simulator. I changed it to Retina 4 inch, and the screen of the simulator become so big! is there a way to reduce the size? 回答1: You can scale it with the following shortcuts: ⌘ + 1 : 100% ⌘ + 2 : 75% ⌘ + 3 : 50% ⌘ + 4 : 33% ⌘ + 5 : 25% Or in iOS Simulator: Window > Scale > ... 回答2: The iOS Simulator's Window menu has an option to display the simulator at 50%, 75%, or 100%. Try one of the smaller values to make it fit. 回答3: Now It's more flexible

Understanding Retina device CSS Media queries

可紊 提交于 2019-12-03 17:35:19
I am working on a WordPress theme and am trying to incorporate retina enabled CSS queries into my CSS file. I would just like to clarify that I have the media queries set up correctly before I change out all my background images. I have doubled the size of all my background images and perfixed them with the "@2x" naming convention. e.g icon-user@2x.png . I have added a jQuery function into my code to swap out the images with the CSS class of hires . In my CSS document I have a normal CSS class for a background image. Normal CSS query .side-nav .arrow { background: url(../images/arrow-nav.png)

How do you generate retina (iPad) friendly (progressive or interlaced) jpeg images with CarrierWave?

[亡魂溺海] 提交于 2019-12-03 16:43:48
There are numerous reports that Mobile Safari downsamples very large JPEG images, making it difficult to put out retina-friendly resolutions for the new iPad. The solution seems to be encoding JPEGs as progressive/interlaced files. Hence, I'm curious how I might use the CarrierWave plugin, and RMagick by extension, to generate this type of file. Thanks! Lucas Renan You can use MiniMagick : manipulate! do |img| img.strip img.combine_options do |c| c.quality "90" c.depth "8" c.interlace "plane" end img end As of today, you will need the repository version of carriewave as options[:write] support

How does JSTileMap handle retina and ipad/iphone tile maps?

痴心易碎 提交于 2019-12-03 16:21:14
I have created a basic tilemap using Tiled. I am using JSTileMap with SpriteKit to get the map in the scene. As I understood, JSTileMap (rather SKTexture) handles the retina and different devices automatically. I have not been able to produce good results so far, here is my setup: I have one .tmx file created at a base resolution using map.png as it's tile set. The .tmx is present in the project but I purposely did not add map.png (I do not want to support non-retina iPhones). In the project I only added the following .png's: map@2x~iphone.png (retina iPhones, using 48x48 tiles) map~ipad.png

Org LaTeX preview is fuzzy on retina displays

廉价感情. 提交于 2019-12-03 14:09:09
问题 I have been using Emacs 24.4 for all my math/scientific notes. org-latex-preview is fantastic for this! But recently, I upgraded to a macbook pro with retina display, and I now see that all my equations in org-mode are... fuzzy. Is there a setting I can change to up-res these? Here is a screenshot: Thanks! 回答1: A couple of years back, I decided to fix this and wrote a patch to add dvisvgm as a render option for latex previews. While this worked great, I never submitted it (no time or

Making an app Retina Display friendly

こ雲淡風輕ζ 提交于 2019-12-03 13:54:45
问题 I have an app and would like to make it retina display friendly. How exactly does the process work? What images need to be added apart from what I have? I know the sizes should be different, but am not sure on the details? What else needs to be done to handle retina display? Should the device be detected and use other images if the device supports retina display? What if there are a lot of images? And how will this effect the app size? Thanks 回答1: A good guide to this can be found here: http:

Tab bar icons on retina display

独自空忆成欢 提交于 2019-12-03 12:58:53
I am making an iPhone App but I can't understand why my custom tab bar icons are pixelated. They are 30x30. If I change the resolution to 60x60, for example, the icons are still pixelated but they are also incomplete. Can you help me to fix this problem? Thank you very much. You don't need to double the size of your non-retina images. You need to create two separate icons icon.png (30x30) and icon@2x.png (60x60). iOS will automatically load the right file based on the screen scale. You can find more information about taking advantage of the retina display at this url: https://developer.apple

SKTexture and the scale property of a UIImage

泪湿孤枕 提交于 2019-12-03 12:25:49
问题 Is there any reason why an SKTexture appears to ignore the .scale of an image when constructed via textureWithImage: ? I have one image resource available, "retina_image@2x.png" When I try to create a texture while creating a UIImage first: UIImage* image = [UIImage imageNamed:@"retina_image"]; SKTexture* texture_image = [SKTexture textureWithImage:image]; NSLog(@"image size %@, scale %f", NSStringFromCGSize(image.size), image.scale); NSLog(@"texture from image, size %@", NSStringFromCGSize

UIView's contentScaleFactor depends on implementing drawRect:?

泪湿孤枕 提交于 2019-12-03 12:24:08
I have stumbled on a weird thing. It looks like UIView 's contentScaleFactor is always 1, even on Retina devices, unless you implement drawRect: . Consider this code: @interface MyView : UIView @end @implementation MyView - (id) initWithFrame: (CGRect) frame { self = [super initWithFrame: frame]; if (self) { NSLog(@"%s %g %g %g", __PRETTY_FUNCTION__, self.contentScaleFactor, self.layer.contentsScale, [UIScreen mainScreen].scale); } return self; } - (void) didMoveToWindow { if (self.window) NSLog(@"%s %g %g %g", __PRETTY_FUNCTION__, self.contentScaleFactor, self.layer.contentsScale, [UIScreen