GithubHelp home page GithubHelp logo

xmnsharemenuexample's Introduction

XMNShareMenuExample

分享列表页面


##预览

##功能

  • 支持最多两行的分享列表显示
  • 支持左右滑动,可以设置第一行显示多少个分享item
  • 支持自定义tag设置,回调时返回自定的tag

##使用方法

//分享媒介数据源,注意使用自定义tag时不要重复 NSArray *shareAry = @[@{kXMNShareImage:@"more_chat", kXMNShareHighlightImage:@"more_chat_highlighted", kXMNShareTitle:@"私信和群",KXMNShareTag:@(1)}, @{kXMNShareImage:@"more_weixin", kXMNShareHighlightImage:@"more_weixin_highlighted", kXMNShareTitle:@"微信好友",,KXMNShareTag:@(2)}, ```

  1. 如果需要头部view 配置头部 headView
  2. 如果需要底部view 配置底部 footerView
  3. 初始化XMNShareView
XMNShareView *shareView = [[XMNShareView alloc] init];
    //设置头部View 如果不设置则不显示头部
    shareView.headerView = headerView;
    [shareView setSelectedBlock:^(NSUInteger tag, NSString *title) {
        NSLog(@"\ntag :%lu  \ntitle :%@",(unsigned long)tag,title);
        
    }];
    
    //计算高度 根据第一行显示的数量和总数,可以确定显示一行还是两行,最多显示2行
    [shareView setupShareViewWithItems:shareAry];
    
    [shareView showUseAnimated:YES];

xmnsharemenuexample's People

Contributors

ws00801526 avatar

Watchers

James Cloos avatar 李焱生 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.