         var x:Float = 0
         for  title in arrItemsTitle! {
             let item = GrandMenuItem()
+            item.selectedColor = itemSeletedColor
+            item.color = itemColor
+            if let f = itemFont{
+                item.fontSize = f
+            }
+            if let sf = itemSelectedFont{
+                item.selectedFontSize = sf
+            }
             item.delegate = self
             var itemWidth = GrandMenuItem.getTitleWidth(title,fontSize: item.fontSize)
             if averageManu{

    func addAnimationWithSelectedItem(item:GrandMenuItem)
    {
        let dx = CGRectGetMidX(item.frame) - CGRectGetMidX(selectedItem!.frame)
//        let positionAnimation = CABasicAnimation()
//        positionAnimation.keyPath = "position.x"
//        positionAnimation.fromValue = vSlider?.layer.position.x
//        positionAnimation.toValue = vSlider!.layer.position.x + dx
        
//        let boundsAnimation = CABasicAnimation()
//        boundsAnimation.keyPath = "bounds.size.width"
//        boundsAnimation.fromValue = CGRectGetWidth(vSlider!.layer.bounds)
//        boundsAnimation.toValue = CGRectGetWidth(item.frame)
        //这个是不必要的动画
        
//        let animationGroup = CAAnimationGroup()
//        animationGroup.animations = [positionAnimation]
//        animationGroup.duration = 0.2
//        vSlider?.layer.addAnimation(animationGroup, forKey: "basic")
//        
//        vSlider?.layer.position = CGPoint(x: vSlider!.layer.position.x + dx, y: vSlider!.layer.position.y)
//        var rect = vSlider!.layer.bounds
//        rect.size.width = CGRectGetWidth(item.frame) - CGFloat(sliderBarLeftRightOffset * 2)
//        vSlider?.layer.bounds = rect
        //这个动画有个小Bug,目前不知道怎么修正,它会先把滑块移动到目的地再消失,再执行动画,所以只好用下面的方法了,这种情况有30%的可能性发生
        //不用这种动画试试
        UIView.animateWithDuration(0.2) { () -> Void in

            for item in arrItems!{
                item.color = itemColor
            }
        }
    }
    
