Steven 3 年之前
父节点
当前提交
6900a94648

二进制
KulexiuForTeacher/KulexiuForTeacher.xcworkspace/xcuserdata/wangzhi.xcuserdatad/UserInterfaceState.xcuserstate


+ 0 - 16
KulexiuForTeacher/KulexiuForTeacher.xcworkspace/xcuserdata/wangzhi.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -275,22 +275,6 @@
       <BreakpointProxy
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
          <BreakpointContent
-            uuid = "67663265-E51F-447F-A81C-6C7442FBC3B2"
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "KulexiuForTeacher/Module/Home/Controller/HomeViewController.m"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "249"
-            endingLineNumber = "249"
-            landmarkName = "-cycleScrollView:didSelectItemAtIndex:"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
             uuid = "F0003F49-A484-4565-AE50-C3F3374E00CA"
             uuid = "F0003F49-A484-4565-AE50-C3F3374E00CA"
             shouldBeEnabled = "Yes"
             shouldBeEnabled = "Yes"
             ignoreCount = "0"
             ignoreCount = "0"

+ 8 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Controller/HomeViewController.m

@@ -79,11 +79,17 @@
     [KSNetworkingManager helpCenterContentListRequest:KS_POST success:^(NSDictionary * _Nonnull dic) {
     [KSNetworkingManager helpCenterContentListRequest:KS_POST success:^(NSDictionary * _Nonnull dic) {
         if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
         if ([dic integerValueForKey:@"code"] == 200 && [dic boolValueForKey:@"status"]) {
             NSArray *sourceArray = [[dic dictionaryValueForKey:@"data"] arrayValueForKey:@"rows"];
             NSArray *sourceArray = [[dic dictionaryValueForKey:@"data"] arrayValueForKey:@"rows"];
-            for (NSDictionary *parm in sourceArray) {
+            if (sourceArray.count) {
+                NSDictionary *parm = [sourceArray firstObject];
                 NoticeSourceModel *bannerModel = [[NoticeSourceModel alloc] initWithDictionary:parm];
                 NoticeSourceModel *bannerModel = [[NoticeSourceModel alloc] initWithDictionary:parm];
                 [self.bannerArray addObject:bannerModel];
                 [self.bannerArray addObject:bannerModel];
                 [self.titleArray addObject:bannerModel.title];
                 [self.titleArray addObject:bannerModel.title];
             }
             }
+            else {
+                self.bannerArray = [NSMutableArray array];
+                self.titleArray = [NSMutableArray array];
+            }
+
             [self refreshBanner];
             [self refreshBanner];
         }
         }
         else {
         else {
@@ -300,7 +306,7 @@
     if (!_noticeScrollView) {
     if (!_noticeScrollView) {
         _noticeScrollView = [SDCycleScrollView cycleScrollViewWithFrame:CGRectZero delegate:self placeholderImage:[UIImage new]];
         _noticeScrollView = [SDCycleScrollView cycleScrollViewWithFrame:CGRectZero delegate:self placeholderImage:[UIImage new]];
         _noticeScrollView.onlyDisplayText = YES;
         _noticeScrollView.onlyDisplayText = YES;
-        _noticeScrollView.autoScroll = YES;
+        _noticeScrollView.autoScroll = NO;
         _noticeScrollView.scrollDirection = UICollectionViewScrollDirectionVertical;
         _noticeScrollView.scrollDirection = UICollectionViewScrollDirectionVertical;
         _noticeScrollView.titleLabelTextColor = HexRGB(0x1a1a1a);
         _noticeScrollView.titleLabelTextColor = HexRGB(0x1a1a1a);
         _noticeScrollView.titleLabelBackgroundColor = [UIColor whiteColor];
         _noticeScrollView.titleLabelBackgroundColor = [UIColor whiteColor];