problem about retina-display-Collection of common programming errors


  • Kara
    ios image retina-display
    I have set of images with @2x counterparts, but @2x arent the exact size they should be. The 2x are smaller than they should be. Width or height is smaller by 1px or 2px.Images are sliced UI which is tightly fitted.Is there something to worry about? Can this cause problems on retina like unexpected spaces?

  • qegal

  • meisel
    ios retina-display
    Since including non-retina images is such a time sink, I thought I should ask… What are some pros and cons of not having non-retina images in your apps? Is the downsizing the Apple does inferior to the usual downsizing that Photoshop does?

  • ffz
    graphics antialiasing retina-display
    Conceptual question, just out of curiosity:What is less taxing on the graphics processor: Anti-aliasing (2x? 4x? Higher?) on a typical desktop machine (around 120-150dpi) or to drive a hi-density (>300dpi) screen without anti-aliasing? This question could pertain to both desktop systems and embedded (smartphones). I’m interested to see the responses!

  • Rob
    iphone ios uiimageview retina-display
    Just wanna know, how do I must use this ?Do I just have to set @2x after the image name ? Or to put it in a specific folder ? Or something else ?Thanks for your advices

  • Eric Brotto
    iphone xcode ios-simulator retina-display
    I have an iPhone Xcode project that currently only contains images for retina display (twice the size as normal and with a @2x.png suffix). When I run the app on the iPhone Simulator (non retina) the images are still being displayed. Does this mean I don’t need to worry about including two sets of images: retina and non-retina?This all seems a bit odd. I would assume that no images would appear on a non retina device if there are no non-@2x files included.Note: I have not tested my app on a non

  • STW
    iphone ios graphics quartz-graphics retina-display
    I’m having difficulty dynamically drawing a reflection of a UIImage at Retina resolution (2x scale). Apple’s sample code for drawing reflections was never updated to take advantage of the higher resolution. Is there an easy solution?

  • Harry
    ios cocoa-touch interface-builder retina-display
    How can I in a right way work with pixel dimensions in Interface Builder? E.g i have an image mockup where all dimensions and sizes in pixels : “this button has margin from the left – 30 pixels e.g. and this textfield is 100 pixels long and so on”.So if I develop for Retina i need to set margin 60 pt or not? And in IB there are only Retina 3.5 and Retina 4 and there is no non-Retina. So what is a right way to handle retina and non retina screens in IB?How to correctly set dimensions for UI eleme

  • user1548418
    objective-c osx cocoa retina-display
    I have two button images, say “myButton.png” and “[email protected]” in my app’s bundle resources. At run time, I load the image using [NSImage imageNamed:@”myButton”] and need to split it into three slices and create three NSImages to use in NSDrawThreePartImage() function.The problem is that each slice NSImage needs to be multi-resolution, so that the system could pick the right resolution dynamically, as it would automatically do with the original whole image.How do you create the automatic mul

  • Todd Ditchendorf
    objective-c osx cocoa osx-lion retina-display
    Given a Cocoa application which runs on Mac OS X 10.7 and later:What is the best way to check, at runtime, if your app is currently running on a Mac with at least one retina display attached?If checking for this sort of thing is just really wrong-headed, I fully welcome a well-reasoned explanation of why (and I will up-vote such answers if they are good).But I’d still like to know :).It seems likely you could just do a check specifically for the new Mac Book Pro “Retina” hardware (the only Mac w

  • nano
    background cocos2d retina-display shared-cache
    I’ve a background in my app, but clicking on a button should change it and use a different one.I cannot add all of them in the sharedTextureCache because each one has a size of >16MB in the cache, and I’ve 30 different backgrounds.What’s the best way for switching the background without a loading time? I don’t want the user to wait when clicking that button.Thanks

  • Janak Nirmal
    iphone objective-c ios memory-management retina-display
    I am developing a game for a company. Right now we are coming across a problem. Our game is made for the iphone and ipad. We have both regular images and @2x images. Our game works perfectly fine on iphone 3gs and all the ipad versions. But our game crashes on iphone 4 and 4s. Is it crashing because its retina? I know all the images are 4x. We are now wondering what kind of ways it can crash. Can anyone help me out here?EDIT:our game uses UIKit, cocos2d and uses OpenGL

  • Keith
    javascript ipad uiwebview opacity retina-display
    I’m developing a web application which is basically loading a UIWebView with locally stored HTML and JS files.There is a single HTML page with multiple <div> elements which correspond to different content and are shown/hidden by changing class using .addClass() and .removeClass() jQuery methods.This works fine in iPad 2 but crashes with memory warning on iPad 3.On investigation I found that changing the opacity property is triggering the crash.Shown below are the two classes that I’m using

  • Marine
    iphone cocos2d-iphone retina-display
    I’m using a CCLabelBMFont to display a very large letter in my game. The SD font size size is 300, HD font size is 600letter =[CCLabelBMFont labelWithString:@”A” fntFile:@”font-test4.fnt”];with the 4 supporting files (font-test4.fnt / -hd.fnt and font-test4.png / -hd.pngEverything works fine in both simulator modes (retina and non-retina).However when running on an iPhone4 the CCLabelBMFont class asserts when sanity checking// scaleW. sanity checkpropertyValue = [nse nextObject]; NSAssert( [prop

  • akishnani
    iphone crash calayer retina-display
    the entire block of code consists of the following:CGSize layerSize = [webview sizeThatFits:CGSizeZero];if ([UIScreen instancesRespondToSelector:@selector(scale)] && [[UIScreen mainScreen] scale] == 2.0f) {UIGraphicsBeginImageContextWithOptions(layerSize, NO, 2.0f); } else {UIGraphicsBeginImageContext(layerSize); }[webview.layer renderInContext:UIGraphicsGetCurrentContext()];screenshot = UIGraphicsGetImageFromCurrentImageContext();UIGraphicsEndImageContext();but after testing, this line

  • Bijoy Thangaraj
    iphone retina-display iphone-5
    I have a doubt about iphone 5 resolution, seems that xcode 4.5 has added a new view size type name “retina 4 full screen” (it’s on attributes inspector). If I try to use this resolution to a view and run it on the iphone 5.1 simulator, it crashes.so, is there a way to develop to iphone 5 having support to iphone 4 or before?the console message says: * Terminating app due to uncaught exception ‘NSInternalInconsistencyException’, reason: ‘The NIB data is invalid.

  • kaiser
    image wordpress retina-display image-size
    I’m planing to create a blog and I’m thinking about how to serve images in the best possible quality without affecting loading times for mobile devices too much.My content column is aprox. 768 display points wide and I’m posting screenshots using a retina Macbook so the images will be at least 1500px wide. Other Retina/HIDPI users should see the version best for them. Is there a recommended best practice for this case? I’m talking only about content images (<img />); no CSS backgrounds. A

  • Marc Mutz – mmutz
    javascript iphone ipad resolution retina-display
    I have this jQuery-script that gives any image or object with tag data-retina=”true” a retina-resolution-image or background-image.But how do I remove the last part from the script so that this function will apply on every image, not just the one with the data-retina tag?(function($) {“use strict”;var retinaReplace = function(element, options) {this.options = options;var $el = $(element);var is_image = $el.is(‘img’);var normal_url = is_image ? $el.attr(‘src’) : $el.backgroundImageUrl();var retin

  • Majid L
    css ios firefox less retina-display
    I am trying to make a background image into a retina image using LESS CSS and RetinaJs:As suggested in RetinaJS user guide, I included a retina.less file with the following contents:.at2x(@path, @w: auto, @h: auto) {background-image: url(@path);@at2x_path: ~`”@{path}”.split(‘.’).slice(0, “@{path}”.split(‘.’).length – 1).join(“.”) + “@2x” + “.” + “@{path}”.split(‘.’)[“@{path}”.split(‘.’).length – 1]`;@media all and (-webkit-min-device-pixel-ratio : 1.5) {background-image: url(@at2x_path);backgrou

  • Emmy
    android ipad retina-display cocos2d-x cocosbuilder
    I followed the instruction in the link below and I can get multi-resolution work on ios platform without cocosBuilder. http://www.cocos2d-x.org/projects/cocos2d-x/wiki/Multi_resolution_supportWhen I use cocosbuilder ccbi file, the images displayed on the ipad screen are still iphone image.cocosbuilder published the resource directory like thisbut it seems like cocos2d-x does not pick the right images for the right resolution from the right directory.Here is my resource setting in the code. I am

Web site is in building