Latest 0.0.2
Homepage https://github.com/CoderDqZhang/ZDQFlowView
License MIT
Platforms ios 8.0, requires ARC
Authors

“`类似淘宝交易流程图
支持pod
pod ‘ZDQFlowView’

##项目效果图

![]([email protected])

##cocoaPods 安装 [地址](http://www.tuicool.com/articles/7VvuAr3"Title") 

##创建ZDQFlowView对象

```swift
flowView = ZDQFlowView(frame: CGRectMake(0,110,ScreenWidth,90))
flowView.delegate = self
flowView.dataSource = self
//设置未选中颜色
flowView.itemNomalTextColor = UIColor.lightGrayColor()
//设置选择颜色
flowView.itemSelectTextColor = UIColor.orangeColor()
self.view.addSubview(flowView1)
flowView.reloadData()

设置代理方法Delegate

 /**
     当前点击在哪一项

     - parameter flowView:
     - parameter selectItem: 选中的第几个
     */
    func flowViewDidSelectItem(flowView: ZDQFlowView, selectItem: NSInteger) {

    }

设置数据源DataSource

/**
 总共有多少个流程

 - parameter flowView:

 - returns: 流程个数
 */
func numberOfFlowViewItemCount(flowView: ZDQFlowView) -> NSInteger {
        return 4
    }
 /**
 每个item的高度和宽度

 - parameter flowView:

 - returns: Item高度和宽度
 */  
func flowViewItemSize(flowView: ZDQFlowView) -> CGSize {
    return CGSizeMake(60, 60)
}
   /**
     每个item的高度和宽度

     - parameter flowView:

     - returns: Item高度和宽度
     */
    func  numberOfFlowViewItem(flowView: ZDQFlowView, index: NSInteger) -> ZDQFlowViewItem {
        let viewItem = ZDQFlowViewItem()
        switch index {
            case 0:
                viewItem.setData("已确认",image: UIImage.init(),type: ZDQFlowViewItemType.ItemCancelDone)
            case 1:
                viewItem.setData("已取消",image: UIImage.init(),type: ZDQFlowViewItemType.ItemCancel)
            case 2:
                viewItem.setData("付款",image: UIImage.init(),type: ZDQFlowViewItemType.ItemSelect)
            default:
                viewItem.setData("见面",image: UIImage.init(),type: ZDQFlowViewItemType.ItemNext)
        }
        return viewItem
    }

有问题或者有更好的建议欢迎发送邮件给我 [email protected]

觉得好用欢迎点击右上角star

Latest podspec

{
    "name": "ZDQFlowView",
    "version": "0.0.2",
    "summary": "u7c7bu4f3cu652fu4ed8u5b9du8d2du7269u6d41u7a0b",
    "homepage": "https://github.com/CoderDqZhang/ZDQFlowView",
    "license": "MIT",
    "authors": {
        "CoderDqZhang": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/CoderDqZhang/ZDQFlowView.git",
        "tag": "0.0.2"
    },
    "source_files": "FlowView/*",
    "resources": "FlowView/*.{png,xib,nib,bundle}",
    "requires_arc": true
}

Pin It on Pinterest

Share This