Giter Site home page Giter Site logo

zyshareview's Introduction

ZYShareView

  • 应用中常见的分享/功能菜单面板, 高仿微信:-)

Usage

Basic Usage

只需简单的2步即可快速集成此控件

1.创建代表每个按钮的模型

// 根据需要创建多个item
ZYShareItem *item0 = [ZYShareItem itemWithTitle:@"发送给朋友"
                                           icon:@"Action_Share"
                                        handler:^{ [weakSelf itemAction:@"点击了发送给朋友"]; }];
...

2.创建shareView并弹出

ZYShareView *shareView = [ZYShareView shareViewWithShareItems:@[item0, item1, item2, item3, item4, item5]
                                                functionItems:@[item6, item7, item8, item9]];
[shareView show];

Tips:
①item数目过多时, 可以侧滑
②shareItems表示第一行的分享滑条, functionItems表示第二行的功能滑条. 若不要某一行, 传nil即可.

Advanced Usage

1.可以根据自己的需求在ZYShareViewDefine.h文件中对UI进行调整

#define ZY_CancelButtonHeight       49.f    // 取消按钮的高度

#define ZY_ItemCellHeight           123.f   // 每个item的高度
#define ZY_ItemCellWidth            70.f    // 每个item的宽度
#define ZY_ItemCellPadding          15.f    // item之间的距离

#define ZY_AnimateDuration          0.3     // 动画时间
#define ZY_DimBackgroundAlpha       0.3     // 半透明背景的alpha值

2.标题和取消按钮可以自由配置其属性

@property (nonatomic, readonly) UILabel *titleLabel;
@property (nonatomic, readonly) UIButton *cancelButton;

Requirements

  • iOS 7.0+
  • Xcode 5.0+

Installation

1.手动添加:

  • 将ZYShareView文件夹中拖拽到项目中
  • 导入头文件:#import "ZYShareView.h"

License

ZYShareView is released under the MIT license. See LICENSE for details.

zyshareview's People

Contributors

zzyspace avatar

Watchers

James Cloos avatar Eugene avatar

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.