美文网首页
自定义筛选控件HYSelectedView

自定义筛选控件HYSelectedView

作者: oceanfive | 来源:发表于2017-01-20 08:24 被阅读34次

    一、前言:

    此控件为一个筛选控件,实现了筛选控件的基本功能。

    二、效果图

    筛选控件效果图筛选控件效果图

    三、使用:

    1、调用初始化方法:

    - (nullable instancetype)initWithFrame:(CGRect)frame titles:(nullable NSArray *)titles dataDict:(nullable NSMutableDictionary *)dict;

    备注:
    @param frame frame
    @param titles 数组,内部放着显示的title
    @param dict 数据源,titles中的每一个元素作为key值,对应的数组数据源为value值

    2、设置代理:

    @property (nonatomic, weak, nullable) id<HYSelectedViewDelegate> hySelectedViewDelegate;

    3、实现代理方法:

    - (void)hySelectedView:(nullable HYSelectedView * )hyView result:(nullable NSDictionary *)result;

    备注:
    选中数据的时候调用的代理方法
    @param hyView hyView
    @param result 数据,titles中的每一个元素作为key值,value值为选中的某一个具体的数据

    四、代码:

    GitHub代码链接

    相关文章

      网友评论

          本文标题:自定义筛选控件HYSelectedView

          本文链接:https://www.haomeiwen.com/subject/lxuibttx.html