retina-display

Images for iphone 5 retina display

江枫思渺然 提交于 2019-12-17 10:45:10
问题 iPhone 5 released, with new screen size and resolution. When we used images for iPhone 4 (retina), we just added "@2x" to image name. Can anybody tell me, is it possible to add different images (backgrounds, buttons, etc), for new iPhone screen? And the second question: can I have in my app separate XIB files: for iPhone old, iPhone new (like for iPhone and iPad)? Thank you! 回答1: Here's an except from my blog about this subject: [UIImage imageNamed:] automatically loads @2x versions of images

How to Draw a single point line in iOS

泄露秘密 提交于 2019-12-17 06:50:13
问题 I was wondering what is the best way to draw a single point line? My goal is to draw this line in a tableViewCell to make it look just like the native cell separator. I don't want to use the native separator because i want to make in a different color and in a different position (not the bottom..). At first i was using a 1px UIView and colored it in grey. But in Retina displays it looks like 2px. Also tried using this method: - (void)drawLine:(CGPoint)startPoint endPoint:(CGPoint)endPoint

Detect Retina Display

与世无争的帅哥 提交于 2019-12-17 02:25:34
问题 Does iOS SDK provides an easy way to check if the currentDevice has an high-resolution display (retina) ? The best way I've found to do it now is : if ([[UIScreen mainScreen] respondsToSelector:@selector(scale)] == YES && [[UIScreen mainScreen] scale] == 2.00) { // RETINA DISPLAY } 回答1: In order to detect the Retina display reliably on all iOS devices, you need to check if the device is running iOS4+ and if the [UIScreen mainScreen].scale property is equal to 2.0. You CANNOT assume a device

KineticJS : scaling issue while using custom clipFunc on 2x pixel aspect display

扶醉桌前 提交于 2019-12-14 02:20:06
问题 Kineticjs automatically adopts canvas size and whole graphics on Retina displays, so all looks sharp and clean without blurry pixelation. But thing goes wrong when I try to use custom clipping function. Here is some code this.layerOne = new Kinetic.Layer(); this.layerTwo = new Kinetic.Layer({ clipFunc : function(c){ var ctx = c.getContext(); ctx.rect(0,0,width,height); } }); If I add shape on layerOne it will be rendered perfectly considering 2x pixel aspect, but the same shape added on

Problems displaying full-screen CAEAGLLayer on Retina iPad

不羁岁月 提交于 2019-12-12 16:10:25
问题 I've run into some problems getting a UIView with a large CAEAGLLayer to display properly. If the frame is above a certain size (apparently 768 in either dimension with a contentScaleFactor of 2.0), it redraws with a distorted image of previous versions of the buffer. It's pretty easy to reproduce in Apple's GLPaint example. PaintingView.m has a hardcoded contentScaleFactor of 1.0, but if you change it to 2.0: self.contentScaleFactor = 2.0; and run it on a Retina iPad (not the simulator), you

Macbook Pro Retina with Chrome + background-attachment: fixed bug

ぃ、小莉子 提交于 2019-12-12 04:46:13
问题 I know that this issue has been discussed before here but I tried every method and none of them worked. I'm trying to make a parallax effect with background-attachment: fixed . On every browser, on every OS is working perfectly except Chrome on Macbook Pro with Retina screen. Here is the website The webpage isn't renders properly. The elements which have background-attachment: fixed are flickering or don't load at all. If you have Retina you can understand what i'm saying. Just open it in

how to disable retina image scaling in cocos2d-x framework

怎甘沉沦 提交于 2019-12-12 03:19:36
问题 I'm porting my android game to osx I'm having problems on devices with retina display, the sprites are either unnececary scaled or the sprites offset are scaled and not in place, I'd like to have a possibility to control this by myself. Is it possible to work in retina mode without scale factor, can I somehow enable usage of a full screen 960x640 and with scale factor still set to 1.0? Could you please tell me how can I do it? 回答1: You can disable retinal display in AppDelegate.cpp file. In

UITableViewCell insert/add style green plus (+) button - how can I grab this image?

♀尐吖头ヾ 提交于 2019-12-11 23:55:54
问题 I need to grab the image for the UITableViewCellEditingStyleInsert button (green +). Of course, I would like to get it in the regular size and in 2x. I didn't think this would be so difficult, but I am having a hard time finding it. Is there a way to get this without a major hack? 回答1: There are some sites that provide free downloadable vectors of the iPhone User Interface elements. You should be able to get the green button from these packages. Since they are vectors, you can resize them to

Resolution Confusion

ぐ巨炮叔叔 提交于 2019-12-11 17:28:43
问题 Resolution Confusion. I am delivering compressed video, as high a resolution as possible for an iOS app. Are these the final and latest formats? 1920 x 1080- iPad 3+/ 1136 x 640- iPad 2,mini, iPhone 4,5/ 480 x 270- iPhone, non-retina Anything else I need to know? 回答1: The resolution of the devices so far are: (landscape) 2048 x 1536 iPad 3+ 1024 x 768 iPad 2 / 1 / mini 1136 x 640 iPhone 5 960 x 640 iPhone 4S / 4 480 x 320 other iPhones 来源: https://stackoverflow.com/questions/13109467

Chartjs v2 on retina display has label size issue (text is too large)

匆匆过客 提交于 2019-12-11 15:00:02
问题 I'm using chart.js with the latest v2.7.1 release. I followed this jsfiddle example for creating a fixed Y-Axis effect when scrolling. It works great but there is one issue with Retina displays (iPhones, Macbooks, etc). var ctx = document.getElementById("myChart").getContext("2d"); var chart = { options: { responsive: true, maintainAspectRatio: false, animation: { onComplete: function(animation) { var sourceCanvas = myLiveChart.chart.canvas; var copyWidth = myLiveChart.scales['y-axis-0']