 	}
 
 
-	public override func drawRect(rect: CGRect) {
+	public override func didMoveToWindow() {
+		super.didMoveToWindow()
+
+		guard let window = window else {
+			return
+		}
+
+		layer.contentsScale = window.screen.scale
+	}
+
+
+	public override func drawLayer(layer: CALayer, inContext context: CGContext) {
+		guard let layer = layer as? LabelLayer else {
+			return
+		}
+
+		renderingLayer = layer
 		lastDrawnFinalizedText = finalizeText()
+
+		UIGraphicsPushContext(context)
 
 		let textContainerOrigin = originForTextContainer()
 		let glyphRange = layoutManager.glyphRangeForTextContainer(textContainer)
 		layoutManager.drawBackgroundForGlyphRange(glyphRange, atPoint: textContainerOrigin)
 		layoutManager.drawGlyphsForGlyphRange(glyphRange, atPoint: textContainerOrigin)
+
+		UIGraphicsPopContext()
 	}
 
 

public /* non-final */ class Label: View {

	private lazy var delegateProxy: DelegateProxy = DelegateProxy(label: self)

	private let layoutManager = LayoutManager()
	private let linkTapRecognizer = UITapGestureRecognizer()



	private func finalizeText() -> NSAttributedString {
		let finalTextColor = renderingLayer.finalTextColor // can change due to animation
		if finalTextColor != lastUsedFinalTextColor {
			lastUsedFinalTextColor = finalTextColor
		}
