sharesdk一句代码即可分享,快速实现社会化分享组件
(2)不要我们的分享菜单,只要编辑界面的接口:
Objective-C
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | #import NSString *imgPath = [[NSBundle mainBundle] pathForResource:@"Sample" ofType:@"jpg"]; NSDictionary *customContent = @{@"text":@"Lisa", @"title":@"题目", @"imgUrl":imgPath}; [ShareSDK showShareEditor:SSDKPlatformTypeSinaWeibo otherPlatformTypes:nil contentName:@"ShareSDK" customFields:customContent onShareStateChanged:^(SSDKResponseState state, SSDKPlatformType platformType, NSDictionary *userData, SSDKContentEntity *contentEntity, NSError *error, BOOL end) { switch (state) { case SSDKResponseStateSuccess: { UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"分享乐成" message:nil delegate:nil cancelButtonTitle:@"确定" otherButtonTitles:nil]; [alertView show]; break; } case SSDKResponseStateFail: &n设计软件 bsp; {UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"分享失败" message:[NSString stringWithFormat:@"%@", error] delegate:nil cancelButtonTitle:@"确定" otherButtonTitles:nil]; [alertView show]; break; } default: break; }
}]; |
“沈阳软件公司”的新闻页面文章、图片、音频、视频等稿件均为自媒体人、第三方机构发布或转载。如稿件涉及版权等问题,请与
我们联系删除或处理,客服QQ:55506560,稿件内容仅为传递更多信息之目的,不代表本网观点,亦不代表本网站赞同
其观点或证实其内容的真实性。
热门文章
使用“扫一扫”即可将网页分享至朋友圈。