     }
 
     private var contentView: PolarView
+
     var contentOffset: Double {
         get {
             return -1 * self.offset

        }
    }

    var polarCoordinatedSubviews: [PolarCoordinated] = []

    var formerPoint: CGPoint!
    func dragging(recognizer: UIPanGestureRecognizer) {
        switch recognizer.state {
        case .Began:
            self.formerPoint = recognizer.locationInView(self)
        case .Changed:
            let v1 = self.formerPoint - self.center
            let v2 = recognizer.locationInView(self) - self.center
            self.contentOffset += getAngle(a: v2, b: v1)
            self.formerPoint = recognizer.locationInView(self)
        case .Ended:
            self.formerPoint = nil
        case .Cancelled:
            self.formerPoint = nil
        default:
            break
        }
    }

    override func addSubview(view: UIView) { }

    func addSubview(polarCoordinated view: PolarCoordinated) {
        if !self.polarCoordinatedSubviews.contains(view) {
            self.polarCoordinatedSubviews.append(view)
        }
        self.setNeedsLayout()
    }

    override func layoutSubviews() {
        self.contentView.frame.size = self.frame.size
        for subview in self.subviewsToShow {
            self.contentView.addSubview(subview)
        }
        for subview in self.contentView.subviews {
            if let polar = subview as? PolarCoordinated where !self.subviewsToShow.contains(polar){
                polar.removeFromSuperview()
            }
        }
        super.layoutSubviews()
    }


class CircularScrollView: RotatableView {
    override init(frame: CGRect) {
        self.contentView = PolarView(radius: 0, angle: 0, frame: frame)
        super.init(frame: frame)
        super.addSubview(self.contentView)

