                     label.width == size.width
                     label.height == size.height
                 }
+                let radial = radials[i]
+                radial.colors = [colors[i], UIColor.clearColor()]
+//                radial.colors = [UIColor.redColor(), UIColor.clearColor()]
+
+                radial.mode = .Radial
+                layout(label, radial) { label, radial in
+                    radial.centerX == label.centerX
+                    radial.centerY == label.centerY
+                    radial.width == self.frame.width
+                    radial.height == self.frame.height
+                }
             }
             
-            let l: AngleGradientLayer = self.layer as! AngleGradientLayer
-           l.locations = angles
+//            let l: AngleGradientLayer = self.layer as! AngleGradientLayer
+//           l.locations = angles
         }
     }
     
-    override public class func layerClass() -> AnyClass {
-        return AngleGradientLayer.self
-    }
+//    override public class func layerClass() -> AnyClass {
+//        return AngleGradientLayer.self
+//    }
     
     public override func touchesBegan(touches: Set<NSObject>, withEvent event: UIEvent) {
         return


@IBDesignable
public class EmotionFinderView: UIControl {
    let centreEmotion = "Calm"
    let topLevelEmotions = ["Peaceful", "Mad", "Sad", "Scared", "Joyful", "Powerful"]
    let centreEmotionLabel : LTMorphingLabel
    var topLevelEmotionLabels : [String: LTMorphingLabel] = [:]
    override init(frame: CGRect) {
        centreEmotionLabel = LTMorphingLabel()
        centreEmotionLabel.textAlignment = NSTextAlignment.Center

    func setup() {
        centreEmotionLabel.text = centreEmotion
        self.addSubview(centreEmotionLabel)
        for (i, emotion) in enumerate(topLevelEmotions) {
            
            let label = LTMorphingLabel()
            label.text = emotion
            label.textAlignment = NSTextAlignment.Center

            topLevelEmotionLabels[emotion] = label

            self.addSubview(label)
            
            let radial = GradientView()
            radial.backgroundColor = UIColor.clearColor()
            radial.colors = [colors[i], UIColor.clearColor()]
//            radial.mode = .Linear
            radials.append(radial)
            self.addSubview(radial)
            
        }
        
//        let l: AngleGradientLayer = self.layer as! AngleGradientLayer
//
//        l.colors = colors
//        l.cornerRadius = CGRectGetWidth(self.bounds) / 2
    }
    
