Tags

agi18n agimagechecker amazonaws android arc autolayout blog building cache calabash certificates clean code cocoa cocoapods data binding debugging deployment target drm ebs ec2 errors facebook fix git i18n images instruments interface builder ios iosx enterpise summit ipad iphone iphone5 kotlin libraries like button linking links llvm memory management method swizzling mobile model mvc mvvm nil objective-c optimizations patch patterns performance presentation provisioning profiles restkit runtime rxjava rxswift security shadows streaming svn swift testing tools tutorials uikit uistackview video view xcode


Subscribe to this blog

Tag: images

iPhone5 -568h image loading

Angel G. Olloqui 28 September, 2012

With the introduction of the retina displays, Apple implemented a few changes when loading images that allowed the SDK to look for the corresponding retina image (named with a @2x convention) automatically. This was a relief for developers, as they do not needed to change the code in their apps. All an iOS developer needs to do is provide the corresponding @2x images of the non-retina ones.
Nowadays, with the introduction of iPhone5 and its bigger display, some images such as backgrounds should also be loaded from a different file or otherwise the image will be stretched. I expected that Apple would make a similar trick, this time with the -568h convention that they imposed for the Default screen. However, in this case, they do not seem to do that. WTF! Why? well, I don't know exactly why but if I try to guess I would say that it is because checking so many paths on runtime introduces a considerable lag, and in contrast with the retina version, the 568 counterparts are used rarely. They will only be applied in backgrounds and similar images, but not in small images such as icons. 

Tags: images, iphone5, method swizzling, runtime

    

Oddities working with images in iOS

Angel G. Olloqui 14 September, 2012

For the last 10 days I have been working in a new library to check iOS images on runtime. I will make another post to explain it in a future, but today I wanted to remark some oddities that I found when working so tightly with the UIImageView class (it is funny that I haven’t realized on most these oddities after almost 3 years working with them)

UIImageView

UIImageView, as any other view in iOS, extends UIView. This characteristic would make everyone think that UIImageView have all the functionality and behave as any other view. However, there are some interesting considerations when working with this component:

Tags: ios, interface builder, images, agimagechecker, debugging, runtime