Latest 1.0.0
Homepage https://github.com/magnusguo/ZYShareView
License MIT
Platforms ios 7.0
Authors
  • 应用中常见的分享/功能菜单面板, 高仿微信:-)

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;

3.可以自由定制n行的item

// 创建一个二维数组, 二维数组中的元素即为每一行的`ZYShareItem`数组.
NSArray *array = @[shareItemsArray, functionItemsArray, otherItemsArray, ...];

ZYShareView *shareView = [[ZYShareView alloc] initWithItemsArray:array];
[shareView show];

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.

Latest podspec

{
    "name": "ZYShareView",
    "version": "1.0.0",
    "summary": "u5e94u7528u4e2du5e38u89c1u7684u5206u4eab/u529fu80fdu83dcu5355u9762u677f, u9ad8u4effu5faeu4fe1:-)",
    "description": "u6a21u4effu5faeu4fe1uff0cu5728u5e94u7528u4e2du5e38u89c1u7684u5206u4eab/u529fu80fdu83dcu5355u9762u677fu3002 magnusguou534fu52a9u517cu5bb9iOS11uff0cu4feeu590du82e5u5e72Warning.",
    "homepage": "https://github.com/magnusguo/ZYShareView",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Ryan Zhang": "http://nszzy.me"
    },
    "platforms": {
        "ios": "7.0"
    },
    "source": {
        "git": "https://github.com/magnusguo/ZYShareView.git",
        "tag": "1.0.0"
    },
    "source_files": [
        "ZYShareView",
        "ZYShareView/*"
    ]
}

Pin It on Pinterest

Share This