SwpShareView 2.1.0

SwpShareView 2.1.0

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Apr 2018

Maintained by swp_song.



  • By
  • swp-song

SwpShareView

Xcode iOS CIStatus Version License Platform SwpShareView pop


SwpShareView

  • 分享弹出视图的简单封装,使用了 pop 库。
  • 之前一直在用三方的分享 UI,项目需要自定义组件,封装了一个简单的分享样式 ( 🙄🙄🙄🙄🙄 )。

效果:

(图片轮播效果)

导入:

  • 手动导入:
  • SwpShareView 文件夹导入项目中。
  • #import "SwpShareViewHeader.h"
  • 依赖库 pop , 需要手动导入。
  • pop

  • CocoaPods 导入:
  • pod search SwpShareView
  • pod 'SwpShareView'
  • #import <SwpShareView/SwpShareViewHeader.h>
  • pod 导入会自动添加依赖库, 无需手动导入

代码示例:

SwpShareModel *teype = [SwpShareModel swpShareWithShareKey:@"custom" setSwpShareTitle:@"自定义" setSwpShareImageName:@"share_custom" setSwpTripartiteFrameworkShareType:@200];

NSArray *datas = @[SwpShareToQQ, SwpShareToQzone, SwpShareToTencent, SwpShareToWechatSession, SwpShareToWechatTimeline, SwpShareToSina, SwpShareToCopyURL];

SwpShareView.swpShareViewShowInitWithDelegate(datas, self)
// 追加自定义 item
.swpShareViewCustomItems(@[teype])
// 未安装软件处理
.swpShareItemType(SwpShareItemTypeEnabled)
// Title 字体大小
.swpShareTitleSize(15)
// 文字
.swpShareTitle(@"分享")
// item 点击回调
.swpShareListViewDidSelectIndexBlockChain(^(SwpShareView *swpShareView, NSInteger didSelectIndex, SwpShareModel *swpShare){
    NSLog(@"%@", swpShare.swpShareKey);
})
// 页面关闭回调
.swpShareViewCloseBlockChain(^(SwpShareView *swpShareView, SwpShareModel *swpShare){
    NSLog(@"Block 页面关闭了");
    NSLog(@"%@", swpShare.swpShareKey);
});
....更多查看源码....

注意

  • PS: 需要检索是否安装应用请在 Info.plist,加入 白名单,详见 Demo

版本记录

  • 版本版本:2.1.0
  • 更新时间:2018-04-10 12:41:48
  • 更新内容:
  • 新增版本资源,优化内部方法

  • 版本版本:2.0.5
  • 更新时间:2018-01-23 17:00:56
  • 更新内容:
  • 更新版本号


备注

  • 持续更新, 如果喜欢, 欢迎 Star

声明

  • 著作权归 ©swp_song,如需转载请标明出处