Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Support for retina view tests #103

merged 2 commits into from Oct 25, 2012


None yet
2 participants

x2on commented Oct 25, 2012

Support for retina view test
fixes #102

This is an iOS6-only API. Please only use APIs available in iOS versions >= 4.3. In this case perhaps use:


It's confusing to have a variable named filename and a different one named fileName. You could avoid this by naming the variable something different, or doing the operation Inline. You also don't need lastPathComponent since filename is expected to be only the name of the file, not the path.

filePath = [[NSBundle mainBundle] pathForResource:[filename stringByDeletingPathExtension] ofType:[filename pathExtension]];
NSData *imageData = [NSData dataWithContentsOfFile:filePath];
image = [UIImage imageWithData:data scale:[UIScreen mainScreen].scale];

Thanks for the pull request! Make the fixes and we'll pull this in.


x2on commented Oct 25, 2012

Restored the compatibility - but used the iOS6 implementation if available (it's faster).

convention is to put the else and brackets on the same line

} else {

might be worth adding a comment noting that this API is iOS6 only

@johnboiles johnboiles added a commit that referenced this pull request Oct 25, 2012

@johnboiles johnboiles Merge pull request #103 from ImmobilienScout24/retina-image-tests
Support for retina view tests

@johnboiles johnboiles merged commit ca5a8ec into gh-unit:master Oct 25, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment