一、
//自定义分享界面 增加分享按钮
[UMSocialUIManager addCustomPlatformWithoutFilted:UMSocialPlatformType_UserDefine_Begin+2
withPlatformIcon:[UIImage imageNamed:@"org_myHome"]
withPlatformName:@"个人主页"];
[UMSocialUIManager addCustomPlatformWithoutFilted:UMSocialPlatformType_UserDefine_Begin+3
withPlatformIcon:[UIImage imageNamed:@"org_myCopy"]
withPlatformName:@"复制链接"];
//移除微信收藏
[[UMSocialManager defaultManager] removePlatformProviderWithPlatformType:UMSocialPlatformType_WechatFavorite];
[UMSocialShareUIConfig shareInstance].sharePageGroupViewConfig.sharePageGroupViewPostionType = UMSocialSharePageGroupViewPositionType_Bottom;
[UMSocialShareUIConfig shareInstance].sharePageScrollViewConfig.shareScrollViewPageItemStyleType = UMSocialPlatformItemViewBackgroudType_None;
[UMSocialUIManager showShareMenuViewInWindowWithPlatformSelectionBlock:^(UMSocialPlatformType platformType, NSDictionary *userInfo)
{
//在回调里面获得点击的
if (platformType == UMSocialPlatformType_UserDefine_Begin+2) {//分享个人主页
dispatch_async(dispatch_get_main_queue(), ^{
if([AppDelegate APP].userInfo.keyKeyId == self.ycDetailModel.orAuthorId)
{
[MBProgressHUD showError:@"不能转发自己的作品!"];
}
[self shareViewShow];
});
}
else if(platformType == UMSocialPlatformType_UserDefine_Begin+3)//复制
{
UIPasteboard *pasteboard = [UIPasteboard generalPasteboard];
pasteboard.string = self.ycDetailModel.ycUrl;
[MBProgressHUD showSuccess:@"复制链接成功!"];
}
else{
[self shareWebPageToPlatformType:platformType];
}
}];
二、清空自定义分享按钮
p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #93c96a }
span.s1 { font: 18.0px "Microsoft YaHei"; color: #ffffff }
span.s2 { font: 14.0px Menlo }
span.s3 { }
[UMSocialUIManager removeAllCustomPlatformWithoutFilted];