         super.layoutSubviews()
     }
 
-    var subviewsToShow: [PolarCoordinated] {
-        let lower = self.contentOffset
-        let upper = self.contentOffset + M_PI * 2
-        return self.polarCoordinatedSubviews.filter { (p) -> Bool in
-            return lower <= p.angle && p.angle < upper
-        }
-    }
 }

import UIKit

class CircularScrollView: RotatableView {
    override init(frame: CGRect) {
        self.contentView = PolarView(radius: 0, angle: 0, frame: frame)
        self.contentView.layer.borderColor = UIColor.yellowColor().CGColor
        super.init(frame: frame)
        super.addSubview(self.contentView)
    }

    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }

    override func addSubview(view: UIView) { }

    private var contentView: PolarView
    var contentOffset: Double {

        }
    }

    var subviewsToShow: [PolarCoordinated] {
        let lower = self.contentOffset
        let upper = self.contentOffset + M_PI * 2
        return self.polarCoordinatedSubviews.filter { (p) -> Bool in
            return lower <= p.angle && p.angle < upper
        }
    }

    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) {
