     //RxSwift资源回收包
     private let disposeBag = DisposeBag()
     
-    public init(frame: CGRect,delegate:ZXCircleViewDelegate) {
+    public override init(frame: CGRect) {
         super.init(frame: frame)
-        self.circleDelegate = delegate
+        self.initUI()
+    }
+    
+    public convenience init() {
+        self.init(frame:CGRectZero)
+        self.initUI()
+    }
+    
+    override public func layoutSubviews() {
+        super.layoutSubviews()
+        
+        self.scrollView.fillSuperview()
+        self.control.anchorToEdge(.Bottom, padding: 0, width: self.frame.size.width, height: 20)
+    }
+    
+    required public init?(coder aDecoder: NSCoder) {
+        fatalError("init(coder:) has not been implemented")
+    }
+    
+    private func initUI() {
         self.scrollView = UIScrollView()
         self.scrollView.delegate = self
         self.scrollView.pagingEnabled = true

        
        self.scrollView.contentSize = contentSize
        self.scrollView.contentOffset = CGPoint(x: self.bounds.size.width, y: 0)
        self.control.pageCount = count

        //设置滚动
        self.timer?.invalidate()
        self.timer = NSTimer.scheduledTimerWithTimeInterval(TimeInterval, target: self, selector: "timerAction", userInfo: nil, repeats: true)

        self.addTapGestureRecognizer()
    }
    
    public func reloadData() {
        let count = self.circleDelegate?.numberOfItemsInCircleView(self)
        guard count != nil else {
            return
        }
        
        guard count > 0 else {
            return
        }
        
        
        //构建视图
        var contentSize = CGSizeMake(0, self.bounds.size.height)
        
        for var i = 0; i < count! + 2; i++ {
            let index = self.dataIndexFromUIndex(i)
            
            let size = self.bounds.size
