分享房间
This commit is contained in:
@@ -11,14 +11,14 @@
|
||||
#import "ApiHost.h"
|
||||
#import "YYUtility.h"
|
||||
#import "HttpRequestHelper.h"
|
||||
#import "XCShareView.h"
|
||||
#import "XPShareView.h"
|
||||
#import "TTPopup.h"
|
||||
#import "XPMacro.h"
|
||||
#import <Masonry/Masonry.h>
|
||||
#import <MJExtension/MJExtension.h>
|
||||
#import <RPSDK/RPSDK.h>
|
||||
|
||||
@interface WeakWebViewScriptMessageDelegate : NSObject<WKScriptMessageHandler>
|
||||
@interface WeakWebViewScriptMessageDelegate : NSObject<WKScriptMessageHandler, XCShareViewDelegate>
|
||||
|
||||
//WKScriptMessageHandler 这个协议类专门用来处理JavaScript调用原生OC的方法
|
||||
@property (nonatomic, weak) id<WKScriptMessageHandler> scriptDelegate;
|
||||
@@ -186,46 +186,26 @@ NSString * const kJSOpenFaceLiveness = @"openFaceLiveness";
|
||||
}
|
||||
|
||||
- (void)showSharePanel {
|
||||
XCShareItem *cycle = [[XCShareItem alloc]init];
|
||||
cycle.title = @"朋友圈";
|
||||
cycle.imageName = @"share_wxcircle";
|
||||
cycle.disableImageName = @"share_wxcircle_disable";
|
||||
cycle.disable = NO;
|
||||
cycle.itemTag = XCShareItemTagMoments;
|
||||
|
||||
XCShareItem *wfriend = [[XCShareItem alloc]init];
|
||||
wfriend.title = @"微信好友";
|
||||
wfriend.imageName = @"share_wx";
|
||||
wfriend.disableImageName = @"share_wx_disable";
|
||||
wfriend.disable = NO;
|
||||
wfriend.itemTag = XCShareItemTagWeChat;
|
||||
|
||||
XCShareItem *zone = [[XCShareItem alloc]init];
|
||||
zone.title = @"QQ空间";
|
||||
zone.imageName = @"share_qqzone";
|
||||
zone.disableImageName = @"share_qqzone_disable";
|
||||
zone.disable = NO;
|
||||
zone.itemTag = XCShareItemTagQQZone;
|
||||
|
||||
XCShareItem *qfriend = [[XCShareItem alloc]init];
|
||||
qfriend.title = @"QQ好友";
|
||||
qfriend.imageName = @"share_qq";
|
||||
qfriend.disableImageName = @"share_qq_disable";
|
||||
qfriend.disable = NO;
|
||||
qfriend.itemTag = XCShareItemTagQQ;
|
||||
|
||||
CGFloat margin = 9;
|
||||
CGSize itemSize = CGSizeMake((KScreenWidth-2*margin)/4, 111);
|
||||
XCShareView *shareView = [[XCShareView alloc]initWithItemSize:itemSize items:@[cycle,wfriend,zone,qfriend] margin:margin];
|
||||
shareView.delegate = self;
|
||||
[TTPopup popupView:shareView style:TTPopupStyleActionSheet];
|
||||
XPShareItem *cycle = [XPShareItem itemWitTag:XPShareItemTagMoments title:@"朋友圈" imageName:@"share_wechat_circle_normal" disableImageName:@"share_wechat_circle_disable"];
|
||||
XPShareItem *wechat = [XPShareItem itemWitTag:XPShareItemTagMoments title:@"微信好友" imageName:@"share_wechat_normal" disableImageName:@"share_wechat_disable"];
|
||||
XPShareItem *qq = [XPShareItem itemWitTag:XPShareItemTagMoments title:@"QQ好友" imageName:@"share_qq_normal" disableImageName:@"share_qq_disable"];
|
||||
XPShareItem *qqzone = [XPShareItem itemWitTag:XPShareItemTagMoments title:@"QQ空间" imageName:@"share_qqzone_normal" disableImageName:@"share_qqzone_disable"];
|
||||
NSArray * items = @[wechat,cycle, qq, qqzone];
|
||||
XPShareInfoModel * shareInfo = [[XPShareInfoModel alloc] init];
|
||||
shareInfo.shareTitle = @"玩和平精英赢奖金";
|
||||
shareInfo.shareContent = @"免费报名,奖金高,比赛多";
|
||||
shareInfo.shareImageUrl = @"";
|
||||
NSString * urlString = @"";
|
||||
shareInfo.shareUrl = urlString;
|
||||
CGFloat margin = 15;
|
||||
CGSize itemSize = CGSizeMake((KScreenWidth-2*margin)/4, 65);
|
||||
XPShareView *shareView = [[XPShareView alloc] initWithItems:items itemSize:itemSize shareInfo:shareInfo];
|
||||
shareView.delegate = self;
|
||||
[TTPopup popupView:shareView style:TTPopupStyleActionSheet];
|
||||
}
|
||||
|
||||
- (void)shareView:(XCShareView *)shareView didSelected:(XCShareItemTag)itemTag {
|
||||
|
||||
}
|
||||
|
||||
- (void)shareViewDidClickCancle:(XCShareView *)shareView {
|
||||
#pragma mark - XCShareViewDelegate
|
||||
- (void)shareViewDidClickCancle:(XPShareView *)shareView {
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user