1、变更推送为阿里云推,清除云信IM以及推送内容;
2、消息页面全新改版; 3、部分微小Bug修复
This commit is contained in:
@@ -20,11 +20,7 @@
|
||||
#define XINGBIECELL_TAG 12341
|
||||
#define QIANMINGCELL_TAG 12342
|
||||
#import "infoSureBtnCell.h"
|
||||
|
||||
#import "UIImage+NTES.h"
|
||||
#import "NTESFileLocationHelper.h"
|
||||
#import "SVProgressHUD.h"
|
||||
//#import "NIMWebImageManager.h"
|
||||
#import "Toast+UIView.h"
|
||||
#import "IfishUserDefaultHelper.h"
|
||||
|
||||
@@ -56,7 +52,6 @@
|
||||
self.navigationItem.title=@"我的信息";
|
||||
self.view.backgroundColor = COLOR_MIAN;
|
||||
|
||||
self.navigationItem.titleView.backgroundColor=[UIColor redColor];
|
||||
[self.navigationController.navigationBar setTitleTextAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:18],NSForegroundColorAttributeName:[UIColor whiteColor]}];
|
||||
|
||||
|
||||
@@ -703,12 +698,6 @@
|
||||
[self.backImg setImage:[saveImage applyBlurWithRadius:28 tintColor:[UIColor colorWithWhite:2 alpha:0.5] saturationDeltaFactor:3.0 maskImage:nil]];
|
||||
|
||||
});
|
||||
//传入云信sdk 头像信息
|
||||
|
||||
NSString*fullpath=[[NSHomeDirectory() stringByAppendingPathComponent:@"Documents"]stringByAppendingPathComponent:@"avatar.png"];
|
||||
UIImage*IMImage=[[UIImage alloc]initWithContentsOfFile:fullpath];
|
||||
|
||||
[self uploadImagetoIM:IMImage];
|
||||
//改头像加金币
|
||||
[self changeUserIcon];
|
||||
|
||||
@@ -734,46 +723,6 @@
|
||||
|
||||
}
|
||||
|
||||
#pragma mark - 上传云信头像
|
||||
|
||||
-(void)uploadImagetoIM:(UIImage *)image
|
||||
{
|
||||
|
||||
|
||||
UIImage *imageForAvatarUpload = [image imageForAvatarUpload];
|
||||
NSString *fileName = [NTESFileLocationHelper genFilenameWithExt:@"jpg"];
|
||||
NSString *filePath = [[NTESFileLocationHelper getAppDocumentPath] stringByAppendingPathComponent:fileName];
|
||||
NSData *data = UIImageJPEGRepresentation(imageForAvatarUpload, 1.0);
|
||||
BOOL success = data && [data writeToFile:filePath atomically:YES];
|
||||
__weak typeof(self) wself = self;
|
||||
if (success) {
|
||||
[SVProgressHUD show];
|
||||
[[NIMSDK sharedSDK].resourceManager upload:filePath progress:nil completion:^(NSString *urlString, NSError *error) {
|
||||
[SVProgressHUD dismiss];
|
||||
if (!error && wself) {
|
||||
[[NIMSDK sharedSDK].userManager updateMyUserInfo:@{@(NIMUserInfoUpdateTagAvatar):urlString} completion:^(NSError *error) {
|
||||
if (!error) {
|
||||
[[SDWebImageManager sharedManager] saveImageToCache:imageForAvatarUpload forURL:[NSURL URLWithString:urlString]];
|
||||
|
||||
}else{
|
||||
|
||||
[wself.view makeToast:@"设置IM头像失败,请重试"
|
||||
];
|
||||
}
|
||||
}];
|
||||
}else{
|
||||
[wself.view makeToast:@"IM图片上传失败,请重试"
|
||||
];
|
||||
}
|
||||
}];
|
||||
}else{
|
||||
[self.view makeToast:@"IM图片保存失败,请重试"
|
||||
];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
#pragma mark--按取消按钮调用方法
|
||||
-(void)imagePickerControllerDidCancel:(UIImagePickerController *)picker{
|
||||
[self dismissViewControllerAnimated:YES completion:nil];
|
||||
|
||||
Reference in New Issue
Block a user