Steven 11 달 전
부모
커밋
b5f33bc4b7

+ 2 - 2
KulexiuForTeacher/KulexiuForTeacher.xcodeproj/xcshareddata/xcschemes/KulexiuForTeacher.xcscheme

@@ -52,7 +52,7 @@
       </Testables>
    </TestAction>
    <LaunchAction
-      buildConfiguration = "DEV"
+      buildConfiguration = "TEST"
       selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
       selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
       launchStyle = "0"
@@ -93,7 +93,7 @@
       buildConfiguration = "Debug">
    </AnalyzeAction>
    <ArchiveAction
-      buildConfiguration = "Release"
+      buildConfiguration = "TEST"
       revealArchiveInOrganizer = "YES">
    </ArchiveAction>
 </Scheme>

+ 30 - 32
KulexiuForTeacher/KulexiuForTeacher/Common/Tools/UMShare/KSUMShareManager.m

@@ -23,7 +23,7 @@
 
 @property (nonatomic, strong) UIImage *shareImage;
 
-@property (nonatomic, strong) UIViewController *displayCtrl;
+@property (nonatomic, weak) UIViewController *displayCtrl;
 
 @property (nonatomic, assign) KSSHARETYPE shareType;
 
@@ -79,24 +79,24 @@
 }
 
 - (void)openShareView {
-    MJWeakSelf;
     [UMSocialUIManager setShareMenuViewDelegate:self];
     [UMSocialUIManager showShareMenuViewInWindowWithPlatformSelectionBlock:^(UMSocialPlatformType platformType, NSDictionary *userInfo) {
         if (platformType == UMSocialPlatformType_UserDefine_Begin+1) { // 分享到群组
-            if (weakSelf.shareType == KSSHARETYPE_IMAGE) {
+            if (self.shareType == KSSHARETYPE_IMAGE) {
                 KSImageShareViewController *shareGroupCtrl = [[KSImageShareViewController alloc] init];
-                shareGroupCtrl.shareImage = weakSelf.shareImage;
+                shareGroupCtrl.shareImage = self.shareImage;
+                
                 [shareGroupCtrl shareGroupCallback:^(BOOL isSuccess, NSString *descMsg) {
-                    if (weakSelf.callback) {
-                        weakSelf.callback(isSuccess,descMsg);
+                    if (self.callback) {
+                        self.callback(isSuccess,descMsg);
                         [LOADING_MANAGER MBShowAUTOHidingInWindow:descMsg];
                     }
                 }];
-                [weakSelf.displayCtrl.navigationController pushViewController:shareGroupCtrl animated:YES];
+                [self.displayCtrl.navigationController pushViewController:shareGroupCtrl animated:YES];
             }
             else {
-                if (weakSelf.callback) {
-                    weakSelf.callback(NO,@"仅支持图片分享到群组");
+                if (self.callback) {
+                    self.callback(NO,@"仅支持图片分享到群组");
                     [LOADING_MANAGER MBShowAUTOHidingInWindow:@"仅支持图片分享到群组"];
                 }
             }
@@ -104,30 +104,30 @@
         }
         else if (platformType == UMSocialPlatformType_UserDefine_Begin+2) { // 图片保存到相册
             UIPasteboard *pasteboard = [UIPasteboard generalPasteboard];
-            pasteboard.string = weakSelf.saveLinkUrl;
+            pasteboard.string = self.saveLinkUrl;
             [LOADING_MANAGER MBShowAUTOHidingInWindow:@"复制成功"];
         }
         else {
             //创建分享消息对象
             UMSocialMessageObject *messageObject = [UMSocialMessageObject messageObject];
             NSString *shareTitle = @"";
-            if (![NSString isEmptyString:weakSelf.shareTitle]) {
-                shareTitle = weakSelf.shareTitle;
+            if (![NSString isEmptyString:self.shareTitle]) {
+                shareTitle = self.shareTitle;
             }
             NSString *descMessage = @"";
-            if (weakSelf.shareMessage) {
-                descMessage = weakSelf.shareMessage;
+            if (self.shareMessage) {
+                descMessage = self.shareMessage;
             }
             // 创建分享对象
-            if (weakSelf.shareType == KSSHARETYPE_IMAGE) {
+            if (self.shareType == KSSHARETYPE_IMAGE) {
                 UMShareImageObject *shareObj = [UMShareImageObject shareObjectWithTitle:shareTitle descr:descMessage thumImage:[UIImage imageNamed:@"shareImage"]];
-                shareObj.shareImage = weakSelf.shareImage;
+                shareObj.shareImage = self.shareImage;
                 //分享消息对象设置分享内容对象
                 messageObject.shareObject = shareObj;
             }
-            else if (weakSelf.shareType == KSSHARETYPE_VODEO) {
+            else if (self.shareType == KSSHARETYPE_VODEO) {
                 UMShareWebpageObject *shareObj = [UMShareWebpageObject shareObjectWithTitle:shareTitle descr:descMessage thumImage:[UIImage imageNamed:@"shareImage"]];
-                shareObj.webpageUrl = weakSelf.shareUrl;
+                shareObj.webpageUrl = self.shareUrl;
                 //分享消息对象设置分享内容对象
                 messageObject.shareObject = shareObj;
             }
@@ -135,8 +135,8 @@
             [[UMSocialManager defaultManager] shareToPlatform:platformType messageObject:messageObject currentViewController:nil completion:^(id data, NSError *error) {
                 if (error) {
                     NSLog(@"************分享失败 %@*********",error);
-                    if (weakSelf.callback) {
-                        weakSelf.callback(NO, @"分享失败");
+                    if (self.callback) {
+                        self.callback(NO, @"分享失败");
                         [LOADING_MANAGER MBShowAUTOHidingInWindow:@"分享失败"];
                     }
                 }else{
@@ -144,8 +144,8 @@
                         UMSocialShareResponse *resp = data;
                         //分享结果消息
                         NSLog(@"************分享成功 %@*********",resp.message);
-                        if (weakSelf.callback) {
-                            weakSelf.callback(YES,@"分享成功");
+                        if (self.callback) {
+                            self.callback(YES,@"分享成功");
                             [LOADING_MANAGER MBShowAUTOHidingInWindow:@"分享成功"];
                         }
                     }else{
@@ -230,13 +230,12 @@
         //分享消息对象设置分享内容对象
         messageObject.shareObject = shareObj;
     }
-    MJWeakSelf;
     //调用分享接口
     [[UMSocialManager defaultManager] shareToPlatform:UMSocialPlatformType_WechatSession messageObject:messageObject currentViewController:nil completion:^(id data, NSError *error) {
         if (error) {
             NSLog(@"************分享失败 %@*********",error);
-            if (weakSelf.callback) {
-                weakSelf.callback(NO, @"分享失败");
+            if (self.callback) {
+                self.callback(NO, @"分享失败");
                 [LOADING_MANAGER MBShowAUTOHidingInWindow:@"分享失败"];
             }
         }else{
@@ -244,8 +243,8 @@
                 UMSocialShareResponse *resp = data;
                 //分享结果消息
                 NSLog(@"************分享成功 %@*********",resp.message);
-                if (weakSelf.callback) {
-                    weakSelf.callback(YES,@"分享成功");
+                if (self.callback) {
+                    self.callback(YES,@"分享成功");
                     [LOADING_MANAGER MBShowAUTOHidingInWindow:@"分享成功"];
                 }
             }else{
@@ -290,12 +289,11 @@
         messageObject.shareObject = shareObj;
     }
     //调用分享接口
-    MJWeakSelf;
     [[UMSocialManager defaultManager] shareToPlatform:UMSocialPlatformType_WechatTimeLine messageObject:messageObject currentViewController:nil completion:^(id data, NSError *error) {
         if (error) {
             NSLog(@"************分享失败 %@*********",error);
-            if (weakSelf.callback) {
-                weakSelf.callback(NO, @"分享失败");
+            if (self.callback) {
+                self.callback(NO, @"分享失败");
                 [LOADING_MANAGER MBShowAUTOHidingInWindow:@"分享失败"];
             }
         }else{
@@ -303,8 +301,8 @@
                 UMSocialShareResponse *resp = data;
                 //分享结果消息
                 NSLog(@"************分享成功 %@*********",resp.message);
-                if (weakSelf.callback) {
-                    weakSelf.callback(YES,@"分享成功");
+                if (self.callback) {
+                    self.callback(YES,@"分享成功");
                     [LOADING_MANAGER MBShowAUTOHidingInWindow:@"分享成功"];
                 }
             }else{

+ 1 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/View/MineDescView.xib

@@ -19,7 +19,7 @@
                         <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="member_bg" translatesAutoresizingMaskIntoConstraints="NO" id="DzB-t0-SFA">
                             <rect key="frame" x="0.0" y="0.0" width="353" height="82"/>
                         </imageView>
-                        <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="mineCenter_tagSvip" translatesAutoresizingMaskIntoConstraints="NO" id="DEK-2J-hc1">
+                        <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="DEK-2J-hc1">
                             <rect key="frame" x="17" y="14" width="18" height="18"/>
                             <constraints>
                                 <constraint firstAttribute="width" constant="18" id="RcF-uk-vDP"/>
@@ -267,6 +267,5 @@
     <resources>
         <image name="member_bg" width="334" height="82"/>
         <image name="member_center" width="74" height="26"/>
-        <image name="mineCenter_tagSvip" width="18" height="18"/>
     </resources>
 </document>