2
0
桂欢 2 жил өмнө
parent
commit
dd33f530d8
19 өөрчлөгдсөн 105 нэмэгдсэн , 187 устгасан
  1. 0 14
      SLAiELTS/SLAiELTS.xcodeproj/project.pbxproj
  2. 25 0
      SLAiELTS/SLAiELTS/Tool/CYLTableViewPlaceHolder/UITableView+Refresh.m
  3. 2 2
      SLAiELTS/SLAiELTS/ViewControllers/Home/Views/Cells/SLHomeMsgCollectionViewCell.m
  4. 5 0
      SLAiELTS/SLAiELTS/ViewControllers/Home/Views/Cells/SLHomeMsgCollectionViewCell.xib
  5. 3 0
      SLAiELTS/SLAiELTS/ViewControllers/MessageVC/Models/MessageModel.h
  6. 2 0
      SLAiELTS/SLAiELTS/ViewControllers/MessageVC/SLMessageViewController.m
  7. 3 1
      SLAiELTS/SLAiELTS/ViewControllers/MessageVC/Views/IMMessageView/YMIMBaseMessageCell.m
  8. 3 1
      SLAiELTS/SLAiELTS/ViewControllers/MessageVC/Views/IMMessageView/YMIMMessageCollectionView.h
  9. 1 0
      SLAiELTS/SLAiELTS/ViewControllers/MessageVC/Views/IMMessageView/YMIMMessageCollectionView.m
  10. 2 2
      SLAiELTS/SLAiELTS/ViewControllers/MyVC/Views/SLBaseCellView.xib
  11. 6 1
      SLAiELTS/SLAiELTS/ViewControllers/TimeLine/TimeLineController/SLFriensInfoVc.xib
  12. 7 7
      SLAiELTS/SLAiELTS/ViewControllers/TimeLine/TimeLineController/SLMomentDetailTableVc.m
  13. 15 9
      SLAiELTS/SLAiELTS/ViewControllers/TimeLine/TimeLineController/SLMomentsVc.m
  14. 7 5
      SLAiELTS/SLAiELTS/ViewControllers/TimeLine/TimeLineController/SLMomentsVc.xib
  15. 1 0
      SLAiELTS/SLAiELTS/ViewControllers/TimeLine/Views/Cell/SDTimeLineCell.m
  16. 22 10
      SLAiELTS/SLAiELTS/ViewControllers/TimeLine/Views/HeaderView/SDTimeLineTableHeaderView.m
  17. 1 1
      SLAiELTS/SLAiELTS/ViewControllers/TimeLine/Views/PhotoContainer/SDWeiXinPhotoContainerView.m
  18. 0 22
      SLAiELTS/SLAiELTS/ViewControllers/TimeLine/Views/TimeLineRefreshFooter/SDTimeLineRefreshFooter.h
  19. 0 112
      SLAiELTS/SLAiELTS/ViewControllers/TimeLine/Views/TimeLineRefreshFooter/SDTimeLineRefreshFooter.m

+ 0 - 14
SLAiELTS/SLAiELTS.xcodeproj/project.pbxproj

@@ -160,7 +160,6 @@
 		3DB97D3E29D6A86E00B12754 /* SDTimeLineCellModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 3DB97D2629D6A86D00B12754 /* SDTimeLineCellModel.m */; };
 		3DB97D3F29D6A86E00B12754 /* SDTimeLineCellOperationMenu.m in Sources */ = {isa = PBXBuildFile; fileRef = 3DB97D2A29D6A86D00B12754 /* SDTimeLineCellOperationMenu.m */; };
 		3DB97D4029D6A86E00B12754 /* SDTimeLineCellCommentView.m in Sources */ = {isa = PBXBuildFile; fileRef = 3DB97D2D29D6A86D00B12754 /* SDTimeLineCellCommentView.m */; };
-		3DB97D4129D6A86E00B12754 /* SDTimeLineRefreshFooter.m in Sources */ = {isa = PBXBuildFile; fileRef = 3DB97D2F29D6A86D00B12754 /* SDTimeLineRefreshFooter.m */; };
 		3DB97D4229D6A86E00B12754 /* SDTimeLineTableHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = 3DB97D3229D6A86D00B12754 /* SDTimeLineTableHeaderView.m */; };
 		3DB97D4329D6A86E00B12754 /* SDTimeLineCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 3DB97D3629D6A86D00B12754 /* SDTimeLineCell.m */; };
 		3DB97D4429D6A86E00B12754 /* SDTimeLineRefreshHeader.m in Sources */ = {isa = PBXBuildFile; fileRef = 3DB97D3829D6A86D00B12754 /* SDTimeLineRefreshHeader.m */; };
@@ -531,8 +530,6 @@
 		3DB97D2A29D6A86D00B12754 /* SDTimeLineCellOperationMenu.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDTimeLineCellOperationMenu.m; sourceTree = "<group>"; };
 		3DB97D2C29D6A86D00B12754 /* SDTimeLineCellCommentView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDTimeLineCellCommentView.h; sourceTree = "<group>"; };
 		3DB97D2D29D6A86D00B12754 /* SDTimeLineCellCommentView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDTimeLineCellCommentView.m; sourceTree = "<group>"; };
-		3DB97D2F29D6A86D00B12754 /* SDTimeLineRefreshFooter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDTimeLineRefreshFooter.m; sourceTree = "<group>"; };
-		3DB97D3029D6A86D00B12754 /* SDTimeLineRefreshFooter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDTimeLineRefreshFooter.h; sourceTree = "<group>"; };
 		3DB97D3229D6A86D00B12754 /* SDTimeLineTableHeaderView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDTimeLineTableHeaderView.m; sourceTree = "<group>"; };
 		3DB97D3329D6A86D00B12754 /* SDTimeLineTableHeaderView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDTimeLineTableHeaderView.h; sourceTree = "<group>"; };
 		3DB97D3529D6A86D00B12754 /* SDTimeLineCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDTimeLineCell.h; sourceTree = "<group>"; };
@@ -1444,7 +1441,6 @@
 			children = (
 				3DB97D2829D6A86D00B12754 /* OperationMenu */,
 				3DB97D2B29D6A86D00B12754 /* CommentView */,
-				3DB97D2E29D6A86D00B12754 /* TimeLineRefreshFooter */,
 				3DB97D3129D6A86D00B12754 /* HeaderView */,
 				3DB97D3429D6A86D00B12754 /* Cell */,
 				3DB97D3729D6A86D00B12754 /* TimeLineRefreshHeader */,
@@ -1473,15 +1469,6 @@
 			path = CommentView;
 			sourceTree = "<group>";
 		};
-		3DB97D2E29D6A86D00B12754 /* TimeLineRefreshFooter */ = {
-			isa = PBXGroup;
-			children = (
-				3DB97D3029D6A86D00B12754 /* SDTimeLineRefreshFooter.h */,
-				3DB97D2F29D6A86D00B12754 /* SDTimeLineRefreshFooter.m */,
-			);
-			path = TimeLineRefreshFooter;
-			sourceTree = "<group>";
-		};
 		3DB97D3129D6A86D00B12754 /* HeaderView */ = {
 			isa = PBXGroup;
 			children = (
@@ -1923,7 +1910,6 @@
 			isa = PBXSourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				3DB97D4129D6A86E00B12754 /* SDTimeLineRefreshFooter.m in Sources */,
 				3D2DC3C929B07A6F0041A729 /* NuiSdkUtils.m in Sources */,
 				3DF3DAE429BAFCCA00CAD3AB /* SLMySpeedCollectionViewCell.m in Sources */,
 				3D1B9CF829C071AD0008D01A /* SLFeedbackVc.m in Sources */,

+ 25 - 0
SLAiELTS/SLAiELTS/Tool/CYLTableViewPlaceHolder/UITableView+Refresh.m

@@ -35,6 +35,18 @@ static char *count = "listCount";
     self.listCount = ^(NSInteger listCount) {
         [wkSelf tableviewRefreshpostListCount:listCount];
     };
+    if (!ZYiPhoneX) {
+        self.mj_header.ignoredScrollViewContentInsetTop = 0;
+    }
+//    self.mj_header.automaticallyChangeAlpha = YES;
+//    
+//    if (@available(iOS 11.0, *)) {
+//            self.mj_header.ignoredScrollViewContentInsetTop = 44;
+//            self.contentInset = UIEdgeInsetsMake(ZYiPhoneX ? -54 : 0, 0, 100, 0);
+//        }else{
+//            self.contentInset = UIEdgeInsetsMake(0, 0, 100, 0);
+//        }
+
 }
 - (void)tableviewRefreshpostListCount:(NSInteger)listCount{
     [self endRefreshing];
@@ -81,6 +93,19 @@ static char *count = "listCount";
     objc_setAssociatedObject(self, @selector(tablePlaceView), tablePlaceView, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
 }
 
+
+- (void)resetInset {
+  
+    // sectionheader停留解决
+//    CGFloat insetT = - self.mj_offsetY > _scrollViewOriginalInset.top ? - self.mj_offsetY : _scrollViewOriginalInset.top;
+//    insetT = insetT > self.mj_h + _scrollViewOriginalInset.top ? self.mj_h + _scrollViewOriginalInset.top : insetT;
+////    self.insetTDelta = _scrollViewOriginalInset.top - insetT;
+//    // 避免 CollectionView 在使用根据 Autolayout 和 内容自动伸缩 Cell, 刷新时导致的 Layout 异常渲染问题
+//    if (fabs(self.mj_insetT - insetT) > FLT_EPSILON) {
+//        self.mj_insetT = insetT;
+//    }
+}
+
 - (void)dealloc{
     CheckRunWhere;
 }

+ 2 - 2
SLAiELTS/SLAiELTS/ViewControllers/Home/Views/Cells/SLHomeMsgCollectionViewCell.m

@@ -12,8 +12,8 @@
 - (void)awakeFromNib {
     [super awakeFromNib];
     // Initialization code
-    [self.headImageView showBadgeWithStyle:WBadgeStyleNumber value:10 animationType:WBadgeAnimTypeNone];
-    self.headImageView.badgeCenterOffset = CGPointMake(-8, 8);
+//    [self.headImageView showBadgeWithStyle:WBadgeStyleNumber value:10 animationType:WBadgeAnimTypeNone];
+//    self.headImageView.badgeCenterOffset = CGPointMake(-8, 8);
 }
 
 - (void)confignCellWithModel:(SLPageModel *)pageMode {

+ 5 - 0
SLAiELTS/SLAiELTS/ViewControllers/Home/Views/Cells/SLHomeMsgCollectionViewCell.xib

@@ -26,6 +26,11 @@
                                     <constraint firstAttribute="width" constant="48" id="AUL-Ml-lNa"/>
                                     <constraint firstAttribute="width" secondItem="GOG-Kd-9jG" secondAttribute="height" id="OIO-PS-uHj"/>
                                 </constraints>
+                                <userDefinedRuntimeAttributes>
+                                    <userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
+                                        <integer key="value" value="24"/>
+                                    </userDefinedRuntimeAttribute>
+                                </userDefinedRuntimeAttributes>
                             </imageView>
                             <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="用户名称" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ajS-0W-q0R">
                                 <rect key="frame" x="72" y="28.666666666666671" width="65.333333333333314" height="24"/>

+ 3 - 0
SLAiELTS/SLAiELTS/ViewControllers/MessageVC/Models/MessageModel.h

@@ -38,6 +38,9 @@ NS_ASSUME_NONNULL_BEGIN
 @property (nonatomic, assign) BOOL showTime;
 
 @property (nonatomic, strong) NSString *toId;
+
+@property (nonatomic, strong) NSString *headImg;
+
 //+ (instancetype)initWithSendText:(NSString *)sendText isReceive:(BOOL)isReceive;
 
 

+ 2 - 0
SLAiELTS/SLAiELTS/ViewControllers/MessageVC/SLMessageViewController.m

@@ -31,6 +31,7 @@
         self.chatServiceView.messageView.chatDataManager = [NSMutableArray arrayWithArray:models];
     }
     self.chatServiceView.friendModel = self.friendModel;
+    self.chatServiceView.messageView.friendModel = self.friendModel;
     [self.chatServiceView mas_makeConstraints:^(MASConstraintMaker *make) {
         make.top.mas_equalTo(kNavBarHeight);
         make.left.bottom.right.equalTo(self.view);
@@ -39,6 +40,7 @@
     WS(weakSelf);
     self.mikeInputView.nuiSpeechRecognizer.recognizerResultBlock = ^(NSString * _Nonnull text, NSString * _Nonnull voicePath) {
         MessageModel *model = [MessageModel initWithSendText:text isReceive:NO showMike:YES showText:NO isMike:YES voicePath:voicePath];
+        model.toId = weakSelf.friendModel.contactsId;
         [weakSelf.chatServiceView.messageView appendMessage:model];
     };
     self.mikeInputView.hidden = YES;

+ 3 - 1
SLAiELTS/SLAiELTS/ViewControllers/MessageVC/Views/IMMessageView/YMIMBaseMessageCell.m

@@ -104,7 +104,8 @@
             self.mikeLabelBgView.backgroundColor = [UIColor whiteColor];
             self.messageLabelBgView.backgroundColor = [UIColor whiteColor];
             self.mikeImageView.image = ImageName(@"icon_msg_yy");
-            self.msgHeaderView.image = ImageName(@"icon_ellipse");
+            NSString *headUrl = [NSString stringWithFormat:@"%@%@",[SLHttpCenter SharedInstance].serverUrl, msgModel.headImg];
+            [self.msgHeaderView sd_setImageWithURL:[NSURL URLWithString:headUrl] placeholderImage:ImageName(@"icon_ellipse")];
             NSInteger timeLong = ceil(msgModel.sendText.length / 4.0);
             self.mikeLabel.text = [NSString stringWithFormat:@"%ld″",timeLong];
             if (!msgModel.showText) {
@@ -356,6 +357,7 @@
         _msgHeaderView = [[UIImageView alloc] initWithFrame:CGRectZero];
         _msgHeaderView.image = ImageName(@"icon_ellipse");
         _msgHeaderView.layer.cornerRadius = 26.0f;
+        _msgHeaderView.contentMode = UIViewContentModeScaleAspectFill;
         _msgHeaderView.clipsToBounds = YES;
         [self.contentView addSubview:_msgHeaderView];
     }

+ 3 - 1
SLAiELTS/SLAiELTS/ViewControllers/MessageVC/Views/IMMessageView/YMIMMessageCollectionView.h

@@ -8,7 +8,7 @@
 
 #import <UIKit/UIKit.h>
 #import "MessageModel.h"
-
+#import "SLFriendsModel.h"
 
 NS_ASSUME_NONNULL_BEGIN
 
@@ -26,6 +26,8 @@ typedef void(^SLMikeInputBroadcastBlock)(MessageModel *msgModel);
 
 @property (nonatomic, strong) NSMutableArray<MessageModel *> *chatDataManager;
 
+@property (nonatomic, strong) SLFriendsModel *friendModel;
+
 - (void)appendMessage:(MessageModel *)message;
 
 - (void)removeAllMessages;

+ 1 - 0
SLAiELTS/SLAiELTS/ViewControllers/MessageVC/Views/IMMessageView/YMIMMessageCollectionView.m

@@ -121,6 +121,7 @@
                 NSString *dataStr = [dataDict objectForKey:@"data"];
                 NSString *str = [self replaceHasPrefix:@"\n" str:dataStr];
                 MessageModel *model = [MessageModel initWithSendText:str isReceive:YES showMike:message.isMike showText:!message.isMike isMike:message.isMike];
+                model.headImg = self.friendModel.head;
                 [self appendRequestMessage:model];
             } failure:^(SPRequestError *error) {
 

+ 2 - 2
SLAiELTS/SLAiELTS/ViewControllers/MyVC/Views/SLBaseCellView.xib

@@ -23,11 +23,11 @@
             <rect key="frame" x="0.0" y="0.0" width="434" height="61"/>
             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
             <subviews>
-                <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="icon_my_yj" translatesAutoresizingMaskIntoConstraints="NO" id="TaG-EK-NYf">
+                <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="icon_my_yj" translatesAutoresizingMaskIntoConstraints="NO" id="TaG-EK-NYf">
                     <rect key="frame" x="15.999999999999998" y="16.333333333333336" width="28.333333333333329" height="28.333333333333336"/>
                     <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                 </imageView>
-                <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="icon_chevron_right" translatesAutoresizingMaskIntoConstraints="NO" id="QJ8-pg-Opu">
+                <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="icon_chevron_right" translatesAutoresizingMaskIntoConstraints="NO" id="QJ8-pg-Opu">
                     <rect key="frame" x="393.33333333333331" y="18.333333333333336" width="24.666666666666686" height="24.333333333333336"/>
                     <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                 </imageView>

+ 6 - 1
SLAiELTS/SLAiELTS/ViewControllers/TimeLine/TimeLineController/SLFriensInfoVc.xib

@@ -26,12 +26,17 @@
                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="nVv-kt-5Om">
                     <rect key="frame" x="0.0" y="0.0" width="390" height="300"/>
                     <subviews>
-                        <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_ellipse" translatesAutoresizingMaskIntoConstraints="NO" id="KTp-mS-JjL">
+                        <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_ellipse" translatesAutoresizingMaskIntoConstraints="NO" id="KTp-mS-JjL">
                             <rect key="frame" x="163" y="91" width="64" height="64"/>
                             <constraints>
                                 <constraint firstAttribute="width" constant="64" id="Btm-0C-WJ8"/>
                                 <constraint firstAttribute="height" constant="64" id="uB4-ZE-3QH"/>
                             </constraints>
+                            <userDefinedRuntimeAttributes>
+                                <userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
+                                    <integer key="value" value="32"/>
+                                </userDefinedRuntimeAttribute>
+                            </userDefinedRuntimeAttributes>
                         </imageView>
                         <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="7Es-Se-YjK">
                             <rect key="frame" x="154" y="171" width="82" height="36"/>

+ 7 - 7
SLAiELTS/SLAiELTS/ViewControllers/TimeLine/TimeLineController/SLMomentDetailTableVc.m

@@ -15,18 +15,18 @@
 
 - (void)viewDidLoad {
     [super viewDidLoad];
-    YMNavigationBar *navigationBar = [[YMNavigationBar alloc] initWithFrame:CGRectMake(0, 0, kSCREEN_WIDTH, kNavBarHeight)];
-    navigationBar.separatorColor = SLBgColor;
-    navigationBar.separatorHeight = 1.0f;
+    
     UIImage *backImage =[UIImage imageNamed:@"icon_nav_back"];
     YMBarButtonItem *backBarButtonItem =[[YMBarButtonItem alloc]initWithImage:backImage style:YMBarButtonItemPlain target:self action:@selector(backBarButtonPressed:)];
     backBarButtonItem.imageInsets = UIEdgeInsetsMake(0, 5, 0, 0);
     backBarButtonItem.title = @"取消";
-    navigationBar.leftBarButtonItem = backBarButtonItem;
-    navigationBar.titleItem.title = @"详情";
-    self.navigationBar = navigationBar;
+    self.navigationBar.leftBarButtonItem = backBarButtonItem;
+    self.title = @"详情";
     self.navigationBar.hidden = NO;
-//    self.tableView.tableHeaderView = navigationBar;
+    [self.tableView mas_updateConstraints:^(MASConstraintMaker *make) {
+        make.top.mas_equalTo(kNavBarHeight);
+    }];
+    self.tableView.tableHeaderView.frame = CGRectZero;
 }
 
 - (void)backBarButtonPressed:(id)pressed {

+ 15 - 9
SLAiELTS/SLAiELTS/ViewControllers/TimeLine/TimeLineController/SLMomentsVc.m

@@ -52,18 +52,14 @@ static CGFloat textFieldH = 56;
 - (void)viewDidLoad
 {
     [super viewDidLoad];
+    UIView *view0 = [[UIView alloc]init];
+    [self.view insertSubview:view0 belowSubview:self.tableView];
     self.navigationBar.hidden = YES;
     if (@available(iOS 11.0, *)) {
         self.tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
     } else {
         self.automaticallyAdjustsScrollViewInsets = NO;
     }
-//    if (@available(iOS 15.0, *)) {
-//        self.tableView.sectionHeaderTopPadding = 0;
-//    } else {
-//        // Fallback on earlier versions
-//    }
-    
     if (!self.userModel) {
         self.userModel = [SLGlobalInfo SharedInstance].loginInfo.user;
     }
@@ -96,7 +92,8 @@ static CGFloat textFieldH = 56;
 {
     [super viewDidAppear:animated];
     [self setupTextField];
-    [self creatModelsWithCount:0];
+//    [self creatModelsWithCount:0];
+    [self.tableView.mj_header beginRefreshing];
 }
 
 - (void)viewWillDisappear:(BOOL)animated
@@ -127,7 +124,8 @@ static CGFloat textFieldH = 56;
             *stop = YES;
         }
     }];
-    SLMomentDetailTableVc *vc = [[SLMomentDetailTableVc alloc] init];
+    SLMomentDetailTableVc *vc = [SLMomentsVc loadViewControllewWithNib];
+    object_setClass(vc, SLMomentDetailTableVc.class);
     vc.isDetail = YES;
     vc.dataArray = [NSMutableArray arrayWithObject:cModel];
     [vc.tableView reloadData];
@@ -228,7 +226,6 @@ static CGFloat textFieldH = 56;
 {
     WS(weakSelf);
     [self.tableView tableviewRefresh:self.dataArray TableViewRefresh:^(NSInteger pageNo, TableListCount listCount) {
-        
         NSDictionary *parameter = @{@"PageIndex": @(pageNo),
                                     @"PageSize": @(SLPageSize),
                                     @"type" : @"0",
@@ -336,6 +333,15 @@ static CGFloat textFieldH = 56;
     return [self.tableView cellHeightForIndexPath:indexPath model:model keyPath:@"model" cellClass:[SDTimeLineCell class] contentViewWidth:[self cellContentViewWith]];
 }
 
+
+- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
+    return 0.001f;
+}
+
+- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
+    return 0.001f;
+}
+
 - (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView
 {
     [_textField resignFirstResponder];

+ 7 - 5
SLAiELTS/SLAiELTS/ViewControllers/TimeLine/TimeLineController/SLMomentsVc.xib

@@ -1,9 +1,10 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21225" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21225" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
     <device id="retina6_0" orientation="portrait" appearance="light"/>
     <dependencies>
         <deployment identifier="iOS"/>
         <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21207"/>
+        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
         <capability name="System colors in document resources" minToolsVersion="11.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
@@ -28,12 +29,13 @@
                     </connections>
                 </tableView>
             </subviews>
+            <viewLayoutGuide key="safeArea" id="B6h-3S-cso"/>
             <color key="backgroundColor" systemColor="systemBackgroundColor"/>
             <constraints>
-                <constraint firstItem="uV7-ff-uk7" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="4Cv-Ie-62u"/>
-                <constraint firstAttribute="bottom" secondItem="uV7-ff-uk7" secondAttribute="bottom" id="Hx7-9p-UFF"/>
-                <constraint firstItem="uV7-ff-uk7" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" id="NT8-ow-lcY"/>
-                <constraint firstAttribute="trailing" secondItem="uV7-ff-uk7" secondAttribute="trailing" id="ZOY-LZ-8g9"/>
+                <constraint firstItem="uV7-ff-uk7" firstAttribute="leading" secondItem="B6h-3S-cso" secondAttribute="leading" id="DL2-1A-Gi6"/>
+                <constraint firstAttribute="bottom" secondItem="uV7-ff-uk7" secondAttribute="bottom" id="HFj-Yl-dIa"/>
+                <constraint firstItem="uV7-ff-uk7" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" id="UYR-uf-3Wg"/>
+                <constraint firstItem="uV7-ff-uk7" firstAttribute="trailing" secondItem="B6h-3S-cso" secondAttribute="trailing" id="cwG-NI-QDt"/>
             </constraints>
             <point key="canvasLocation" x="128" y="-1"/>
         </view>

+ 1 - 0
SLAiELTS/SLAiELTS/ViewControllers/TimeLine/Views/Cell/SDTimeLineCell.m

@@ -176,6 +176,7 @@ NSString *const kSDTimeLineCellOperationButtonClickedNotification = @"SDTimeLine
     .topSpaceToView(contentView, 8)
     .widthIs(48)
     .heightIs(48);
+    _iconView.layer.cornerRadius = 24.0f;
     
     _nameLable.sd_layout
     .leftSpaceToView(_iconView, 12)

+ 22 - 10
SLAiELTS/SLAiELTS/ViewControllers/TimeLine/Views/HeaderView/SDTimeLineTableHeaderView.m

@@ -62,6 +62,8 @@
     _backgroundImageView = [UIImageView new];
     _backgroundImageView.image = ImageName(@"icon_home_zysj");
     _backgroundImageView.userInteractionEnabled = YES;
+//    _backgroundImageView.contentMode = UIViewContentModeScaleAspectFill;
+//    _backgroundImageView.clipsToBounds = YES;
     [self addSubview:_backgroundImageView];
     
     _iconView = [UIImageView new];
@@ -114,30 +116,40 @@
             
     }];
     [self addSubview:moreInterestBtn];
-    
-    
-    _backgroundImageView.sd_layout.spaceToSuperView(UIEdgeInsetsMake(-54, 0, 40, 0));
-    
+
+    _backgroundImageView.sd_layout.spaceToSuperView(UIEdgeInsetsMake(0, 0, 40, 0));
+    UIView *topView = [[UIView alloc] init];
+    topView.backgroundColor = [UIColor whiteColor];
+    [self addSubview:topView];
+    topView.sd_layout
+    .heightIs(54)
+    .leftSpaceToView(self, 0)
+    .rightSpaceToView(self, 0)
+    .topSpaceToView(self, -54);
+//
     _iconView.sd_layout
     .widthIs(64)
     .heightIs(64)
     .leftSpaceToView(self, 16)
     .bottomSpaceToView(self, 94);
-    
-    
+    _iconView.layer.cornerRadius = 32.0f;
+    _iconView.clipsToBounds = YES;
+    _iconView.contentMode = UIViewContentModeScaleAspectFill;
+
+
     _nameLabel.tag = 1000;
     [_nameLabel setSingleLineAutoResizeWithMaxWidth:200];
     _nameLabel.sd_layout
     .leftSpaceToView(_iconView, 9)
     .centerYEqualToView(_iconView)
     .heightIs(24);
-    
+
     _interestcrollView.sd_layout
     .heightIs(26)
     .leftSpaceToView(self, 16)
     .rightSpaceToView(self, 50)
     .bottomSpaceToView(self, 54);
-    
+
 //    _creatBtn.sd_layout
 //    .widthIs(36)
 //    .heightIs(36)
@@ -146,9 +158,9 @@
     [_creatBtn mas_makeConstraints:^(MASConstraintMaker *make) {
         make.width.height.mas_equalTo(36);
         make.right.equalTo(self.mas_right).offset(-12);
-        make.top.mas_equalTo(10);
+        make.top.mas_equalTo(kSafeAreaTop);
     }];
-    
+
     moreInterestBtn.sd_layout
     .widthIs(26)
     .heightIs(26)

+ 1 - 1
SLAiELTS/SLAiELTS/ViewControllers/TimeLine/Views/PhotoContainer/SDWeiXinPhotoContainerView.m

@@ -138,7 +138,7 @@
 - (CGFloat)itemWidthForPicPathArray:(NSArray *)array
 {
     if (array.count == 1) {
-        return (kSCREEN_WIDTH - 100);
+        return 150 * KScaleW;
     } else {
         CGFloat w = (kSCREEN_WIDTH - 100) / 3.0;
         return w;

+ 0 - 22
SLAiELTS/SLAiELTS/ViewControllers/TimeLine/Views/TimeLineRefreshFooter/SDTimeLineRefreshFooter.h

@@ -1,22 +0,0 @@
-//
-//  SDTimeLineRefreshFooter.h
-//  GSD_WeiXin(wechat)
-//
-//  Created by aier on 16/3/6.
-//  Copyright © 2016年 GSD. All rights reserved.
-//
-
-#import "SDBaseRefreshView.h"
-
-@interface SDTimeLineRefreshFooter : SDBaseRefreshView
-
-+ (instancetype)refreshFooterWithRefreshingText:(NSString *)text;
-
-- (void)addToScrollView:(UIScrollView *)scrollView refreshOpration:(void(^)())refrsh;
-
-@property (nonatomic, strong) UILabel *indicatorLabel;
-@property (nonatomic, strong) UIActivityIndicatorView *indicator;
-
-@property (nonatomic, copy) void (^refreshBlock)();
-
-@end

+ 0 - 112
SLAiELTS/SLAiELTS/ViewControllers/TimeLine/Views/TimeLineRefreshFooter/SDTimeLineRefreshFooter.m

@@ -1,112 +0,0 @@
-//
-//  SDTimeLineRefreshFooter.m
-//  GSD_WeiXin(wechat)
-//
-//  Created by aier on 16/3/6.
-//  Copyright © 2016年 GSD. All rights reserved.
-//
-
-#import "SDTimeLineRefreshFooter.h"
-#import "UIView+SDAutoLayout.h"
-
-#define kSDTimeLineRefreshFooterHeight 50
-
-@implementation SDTimeLineRefreshFooter
-
-+ (instancetype)refreshFooterWithRefreshingText:(NSString *)text
-{
-    SDTimeLineRefreshFooter *footer = [SDTimeLineRefreshFooter new];
-    footer.indicatorLabel.text = text;
-    return footer;
-}
-
-- (instancetype)initWithFrame:(CGRect)frame
-{
-    if (self = [super initWithFrame:frame]) {
-        [self setupView];
-    }
-    return self;
-}
-
-- (void)addToScrollView:(UIScrollView *)scrollView refreshOpration:(void (^)())refrsh
-{
-    self.scrollView = scrollView;
-    self.refreshBlock = refrsh;
-}
-
-- (void)setupView
-{
-    UIView *containerView = [UIView new];
-    [self addSubview:containerView];
-    
-    self.indicatorLabel = [UILabel new];
-    self.indicatorLabel.textColor = [UIColor lightGrayColor];
-    self.indicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
-    [self.indicator startAnimating];
-    [containerView sd_addSubviews:@[self.indicatorLabel, self.indicator]];
-    
-    containerView.sd_layout
-    .heightIs(20)
-    .centerYEqualToView(self)
-    .centerXEqualToView(self);
-    [containerView setupAutoWidthWithRightView:self.indicatorLabel rightMargin:0]; // 宽度自适应
-    
-    self.indicator.sd_layout
-    .leftEqualToView(containerView)
-    .topEqualToView(containerView); // ActivityIndicatorView 宽高固定不用约束
-    
-    self.indicatorLabel.sd_layout
-    .leftSpaceToView(self.indicator, 5)
-    .topEqualToView(containerView)
-    .bottomEqualToView(containerView);
-    [self.indicatorLabel setSingleLineAutoResizeWithMaxWidth:250]; // label宽度自适应
-}
-
-- (void)setScrollView:(UIScrollView *)scrollView
-{
-    [super setScrollView:scrollView];
-    
-    [scrollView addSubview:self];
-    self.hidden = YES;
-}
-
-- (void)endRefreshing
-{
-    [super endRefreshing];
-    
-    [UIView animateWithDuration:0.2 animations:^{
-        self.scrollView.contentInset = self.scrollViewOriginalInsets;
-    }];
-}
-
-- (void)setRefreshState:(SDWXRefreshViewState)refreshState
-{
-    [super setRefreshState:refreshState];
-    
-    if (refreshState == SDWXRefreshViewStateRefreshing) {
-        self.scrollViewOriginalInsets = self.scrollView.contentInset;
-        UIEdgeInsets insets = self.scrollView.contentInset;
-        insets.bottom += kSDTimeLineRefreshFooterHeight;
-        self.scrollView.contentInset = insets;
-        if (self.refreshBlock) {
-            self.refreshBlock();
-        }
-    }
-}
-
-- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary<NSString *,id> *)change context:(void *)context
-{
-    if (keyPath != kSDBaseRefreshViewObserveKeyPath) return;
-    
-    if (self.scrollView.contentOffset.y > self.scrollView.contentSize.height - self.scrollView.height && self.refreshState != SDWXRefreshViewStateRefreshing) {
-//        self.frame = CGRectMake(0, self.scrollView.contentSize.height, 200, kSDTimeLineRefreshFooterHeight);
-        self.frame = CGRectZero;
-        self.hidden = NO;
-        self.refreshState = SDWXRefreshViewStateRefreshing;
-    }else if (self.refreshState == SDWXRefreshViewStateNormal) {
-        self.hidden = YES;
-    }
-}
-
-
-@end