This application is modifying the autolayout engine from a background thread, which can lead to engine corruption and weird crashes. This will cause an exception in a future release.
把彈出友盟的方法放到主線(xiàn)程就行了
//打開(kāi)umeng分享面板
dispatch_async(dispatch_get_main_queue(), ^{
[UMSocialUIManager showShareMenuViewInWindowWithPlatformSelectionBlock:^(UMSocialPlatformType platformType, NSDictionary *userInfo) {
//創(chuàng)建分享消息對(duì)象
UMSocialMessageObject *messageObject = [UMSocialMessageObject messageObject];
//設(shè)置文本
messageObject.text = [dic objectForKey:@"title"];
//調(diào)用分享接口
[[UMSocialManager defaultManager] shareToPlatform:platformType messageObject:messageObject currentViewController:self completion:^(id data, NSError *error) {
if (error) {
NSLog(@"************Share fail with error %@*********",error);
}else{
NSLog(@"response data is %@",data);
}
}];
}];
});