Giter Site home page Giter Site logo

mlmoptionselectview's Introduction

MLMOptionSelectView

#弹出-选择-展示框 可设置弹出的方向,是否有箭头,是否可以编辑删除。

#效果图展示

image image

###更新 - 更改之前的弹出视图方法,具体使用参考demo

/**
 *  弹出视图,配合edgeInsets使用,如果不设置edgeInsets,弹出效果会根据width进行适配弹出,建议使用edgeInsets
 *
 *  @param offset_Scale     弹出点在对用方向view上的百分比
 *  @param width            能够显示的最大宽度
 *  @param targetView       弹出视图围绕显示的view
 *  @param directionType    弹出方向,在上下或者左右都能显示时,优先选择
 */
- (void)showOffSetScale:(CGFloat)offset_Scale
              viewWidth:(CGFloat)width
             targetView:(UIView *)targetView
              direction:(MLMOptionSelectViewDirection)directionType;

###更新 - 添加新方法,弹出中心点视图

/**
 *  弹出视图
 *
 *  @param viewCenter      弹出视图的中心点
 *  @param width           能够显示的最大宽度
 */
- (void)showViewCenter:(CGPoint)viewCenter
             viewWidth:(CGFloat)width;

###更新 - 添加属性

///显示时,距离四周的间距,具体对齐方式,可以自行根据需求设置,弹出样式设置更加灵活
@property (nonatomic, assign) UIEdgeInsets edgeInsets;

###更新 - 添加新方法,从点击点展开视图,具体使用参考Demo

/**
 *  弹出视图
 *
 *  @param tapPoint      点击的点
 *  @param width         能够显示的最大宽度
 *  @param directionType 弹出方向,在上下或者左右都能显示时,优先选择
 */
- (void)showTapPoint:(CGPoint)tapPoint
           viewWidth:(CGFloat)width
           direction:(MLMOptionSelectViewDirection)directionType;

#属性介绍 ###需要设置的属性

//设置返回的cell,用于自定义返回的下拉框中的cell样式
@property (nonatomic, copy) UITableViewCell*(^cell)(NSIndexPath *);
//返回的行数
@property (nonatomic, copy) NSInteger(^rowNumber)() ;
//设置返回的每一行的高度
@property (nonatomic, copy) float(^optionCellHeight)();
//点击的回调
@property (nonatomic, copy) ActionBack selectedOption;
//在设置可以编辑之后,可在其中自己写删除事件
@property (nonatomic, copy) ActionBack removeOption;

###调节样式的属性

//设置显示的最大行数
@property (nonatomic, assign) NSInteger maxLine;
//设置是否可以进行编辑
@property (nonatomic, assign) BOOL canEdit;
//设置是否含有箭头
@property (nonatomic, assign) MLMOptionSelectViewType optionType;
//设置展开时的动画样式,是缩放还是竖直水平展开,缩放 NO 竖直或水平展开 YES
@property (nonatomic, assign) BOOL vhShow;
//改变值,如果是缩放动画时,可以改变动画开始的点
@property (nonatomic, assign) CGFloat arrow_offset;//(0 - 1之间)
///选择样式,是否开启多选,默认NO
@property (nonatomic, assign) BOOL multiSelect;

mlmoptionselectview's People

Contributors

mengliming avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

mlmoptionselectview's Issues

怎么监听视图弹开与关闭?

be54ce74-9450-4a1f-8f2b-6902f8b46345
下拉列表出现的时候想通知按钮的三角形翻转与文字变成红色,
下拉列表消失的时候想通知按钮的三角形回复原样与文字变成黑色。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.