             self.movingView.layer.setAffineTransform(CGAffineTransform.identity.rotated(by: self.angle))
         })
     }
+
+    override public var intrinsicContentSize: CGSize {
+        if frame.size == CGSize.zero {
+            let side = circleRadius + arcRadius + lineWidth * 2
+            return CGSize(width: side, height: side)
+        } else {
+            return frame.size
+        }
+    }
 }

import GLKit

@IBDesignable
open class FRCircleSlider: UIControl {

    @IBInspectable var selectedColor: UIColor = UIColor.blue
    @IBInspectable var firstDotColor: UIColor = UIColor.gray


    // MARK: - Draw elements

    override public func draw(_ rect: CGRect) {
        self.drawProgressBackCircle(rect)
        self.drawConnector(rect)
        self.drawDot1(rect)
