Giter VIP home page Giter VIP logo

thinsharesdk's Introduction

ThinShareSDK

轻量级分享框架,可扩展性强,自由定制界面,该框架是静态库文件可以直接拖拽到工程使用也可以打包成.a文件使用
已经集成QQ好友QQ空间微信好友微信朋友圈微信收藏系统短信系统邮件的链接与文本分享
默认分享界面适配不同的苹果设备


##安装

  1. OKWShareSDK整个项目放在要使用工程的文件夹内下,并把OKWShareSDK.xcodeproj,拖拽到该工程目录面板中,创建一个workSpace

  2. 添加资源文件OKWShareResource.bundle到主工程中,里面包含创建界面所需要的图标,因为已经集成了QQ微信,与系统分享所以需要添加下面的Framework静态库文件

  3. Build Settings选择项卡中设置Search Paths

  4. 设置OKWShareSDK-Prefix中的WEIXIN_APP_KEYQQ_APP_KEY

  5. 关于info.plist修改与其他设置参考Demo


##使用 注意
使用前请在OKWShareDemo-Prefix.pchOKWShareSDK-Prefix.pch文件中设置微信与QQ的AppKey,否则无法分享,由于涉及隐私所以Demo里面没有设置微信与QQ的AppKey
使用默认菜单分享链接

    NSData *data = [NSData dataWithContentsOfURL:[NSURL URLWithString:@"http://img05.tooopen.com/images/20150830/tooopen_sy_140703593676.jpg"]];
    
    id model = [OKWShareSDK webContentTitle:@"分享链接" description:@"测试分享" webpageUrl:@"www.baidu.com" thumbImageData:data];   //构建Model
    [OKWShareSDK defaultShareMenu:@"title" model:model];    //使用默认菜单分享

效果


选择分享类型分享

    //分享链接
    
    NSData *data = [NSData dataWithContentsOfURL:[NSURL URLWithString:@"http://i1.ce.cn/ce/life/xxsh/dwyd/200909/22/W020090922351057588500.jpg"]];
    
    id model = [OKWShareSDK webContentTitle:@"分享链接" description:@"测试分享" webpageUrl:@"www.baidu.com" thumbImageData:data];   //构建Model
    
    NSArray *typeArray = [OKWShareSDK getShareListType:OKWShareTypeQQ,OKWShareTypeWeChatFav,OKWShareTypeSMS ,nil];  //构建分享类型
    
    [OKWShareSDK defaultOptionShareMenu:@"title" model:model types:typeArray];

效果


分享文本

    id model = [OKWShareSDK textContent:@"分享文本信息"]; //构建Model
    [OKWShareSDK defaultShareMenu:@"title" model:model];

#关于扩展与源码说明请参考我的博客
#QQ:358812735

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.