[fix]: On Retina displays, the CALayer had it scale not corresponding to the display.

This commit is contained in:
Renaud Pradenc
2013-01-17 14:25:23 +01:00
parent f0ac1ee295
commit 85ed70e707
7 changed files with 17 additions and 12 deletions

View File

@@ -28,7 +28,7 @@ Because the progress view uses Core Animation, your target must also link with t
## Compatibility ##
CERoundProgressView is compatible with iOS 5.0 (not tested on betas of iOS 6 yet).
CERoundProgressView is compatible with iOS 5 and iOS 6.
#### Automatic Reference Counting ####
ARC is not enabled in the sample project, and the classes manage memory the old way.

View File

@@ -25,6 +25,8 @@
if([layer isKindOfClass:[CERoundProgressLayer class]])
{
CERoundProgressLayer *otherLayer = layer;
self.progress = otherLayer.progress;
self.startAngle = otherLayer.startAngle;
self.tintColor = otherLayer.tintColor;

View File

@@ -46,6 +46,9 @@
self.opaque = NO;
self.tintColor = [UIColor colorWithRed:0.2 green:0.45 blue:0.8 alpha:1.0];
self.trackColor = [UIColor whiteColor];
// On Retina displays, the layer must have its resolution doubled so it does not look blocky.
self.layer.contentsScale = [UIScreen mainScreen].scale;
}

View File

@@ -1,20 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="8.00">
<data>
<int key="IBDocument.SystemTarget">1296</int>
<string key="IBDocument.SystemVersion">11E53</string>
<string key="IBDocument.InterfaceBuilderVersion">2182</string>
<string key="IBDocument.AppKitVersion">1138.47</string>
<string key="IBDocument.HIToolboxVersion">569.00</string>
<int key="IBDocument.SystemTarget">1536</int>
<string key="IBDocument.SystemVersion">12C60</string>
<string key="IBDocument.InterfaceBuilderVersion">2844</string>
<string key="IBDocument.AppKitVersion">1187.34</string>
<string key="IBDocument.HIToolboxVersion">625.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="NS.object.0">1181</string>
<string key="NS.object.0">1930</string>
</object>
<array key="IBDocument.IntegratedClassDependencies">
<string>IBUISlider</string>
<string>IBUIButton</string>
<string>IBUIView</string>
<string>IBProxyObject</string>
<string>IBUIButton</string>
<string>IBUISlider</string>
<string>IBUIView</string>
</array>
<array key="IBDocument.PluginDependencies">
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
@@ -295,7 +295,7 @@
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
<real value="1296" key="NS.object.0"/>
<real value="1536" key="NS.object.0"/>
</object>
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
@@ -303,6 +303,6 @@
<string key="Pause.png">{57, 57}</string>
<string key="Play.png">{57, 57}</string>
</dictionary>
<string key="IBCocoaTouchPluginVersion">1181</string>
<string key="IBCocoaTouchPluginVersion">1930</string>
</data>
</archive>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 15 KiB