Skip to content

Commit f758d03

Browse files
committed
首页修改
1 parent 1c21422 commit f758d03

File tree

96 files changed

+1608
-45
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+1608
-45
lines changed

ZuiYou/ZuiYou.xcodeproj/project.pbxproj

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,18 @@
4242
04A22FC1204A49D6006290B4 /* ZYMemberM.m in Sources */ = {isa = PBXBuildFile; fileRef = 04A22FC0204A49D6006290B4 /* ZYMemberM.m */; };
4343
04A22FC4204A6A38006290B4 /* ZYGodReviewsM.m in Sources */ = {isa = PBXBuildFile; fileRef = 04A22FC3204A6A38006290B4 /* ZYGodReviewsM.m */; };
4444
04A22FCC204A7C66006290B4 /* ZYFeaturedCellM.m in Sources */ = {isa = PBXBuildFile; fileRef = 04A22FCB204A7C66006290B4 /* ZYFeaturedCellM.m */; };
45+
04A22FCF204CF096006290B4 /* ZYImageSC.m in Sources */ = {isa = PBXBuildFile; fileRef = 04A22FCE204CF096006290B4 /* ZYImageSC.m */; };
46+
04D9019A204D655900B1601B /* NSArray+IGListDiffable.m in Sources */ = {isa = PBXBuildFile; fileRef = 04D90199204D655900B1601B /* NSArray+IGListDiffable.m */; };
47+
04D9019E204D8A9A00B1601B /* ZYImageSectionCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 04D9019C204D8A9A00B1601B /* ZYImageSectionCell.m */; };
48+
04D9019F204D8A9A00B1601B /* ZYImageSectionCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 04D9019D204D8A9A00B1601B /* ZYImageSectionCell.xib */; };
49+
04D901A3204E2E8C00B1601B /* ZYFTopicCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 04D901A1204E2E8C00B1601B /* ZYFTopicCell.m */; };
50+
04D901A4204E2E8C00B1601B /* ZYFTopicCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 04D901A2204E2E8C00B1601B /* ZYFTopicCell.xib */; };
51+
04D901A8204E364400B1601B /* ZYFInfoCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 04D901A6204E364400B1601B /* ZYFInfoCell.m */; };
52+
04D901A9204E364400B1601B /* ZYFInfoCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 04D901A7204E364400B1601B /* ZYFInfoCell.xib */; };
53+
04D901AD204E42D100B1601B /* ZYFGodReviewsCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 04D901AB204E42D100B1601B /* ZYFGodReviewsCell.m */; };
54+
04D901AE204E42D100B1601B /* ZYFGodReviewsCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 04D901AC204E42D100B1601B /* ZYFGodReviewsCell.xib */; };
55+
04D901B1204E79FB00B1601B /* ZYFGodReviewsSC.m in Sources */ = {isa = PBXBuildFile; fileRef = 04D901B0204E79FB00B1601B /* ZYFGodReviewsSC.m */; };
56+
04D901B5204FE98700B1601B /* IGListDisplayDelegateM.m in Sources */ = {isa = PBXBuildFile; fileRef = 04D901B4204FE98700B1601B /* IGListDisplayDelegateM.m */; };
4557
C2C12D0E451DC323CEE71041 /* libPods-ZuiYou.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 935B330EAF592B08736656DC /* libPods-ZuiYou.a */; };
4658
/* End PBXBuildFile section */
4759

@@ -117,6 +129,26 @@
117129
04A22FC9204A7AFE006290B4 /* UICollectionViewCell+ZYExtension.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UICollectionViewCell+ZYExtension.h"; sourceTree = "<group>"; };
118130
04A22FCA204A7C66006290B4 /* ZYFeaturedCellM.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ZYFeaturedCellM.h; sourceTree = "<group>"; };
119131
04A22FCB204A7C66006290B4 /* ZYFeaturedCellM.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ZYFeaturedCellM.m; sourceTree = "<group>"; };
132+
04A22FCD204CF096006290B4 /* ZYImageSC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ZYImageSC.h; sourceTree = "<group>"; };
133+
04A22FCE204CF096006290B4 /* ZYImageSC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ZYImageSC.m; sourceTree = "<group>"; };
134+
04D90198204D655900B1601B /* NSArray+IGListDiffable.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSArray+IGListDiffable.h"; sourceTree = "<group>"; };
135+
04D90199204D655900B1601B /* NSArray+IGListDiffable.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSArray+IGListDiffable.m"; sourceTree = "<group>"; };
136+
04D9019B204D8A9A00B1601B /* ZYImageSectionCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ZYImageSectionCell.h; sourceTree = "<group>"; };
137+
04D9019C204D8A9A00B1601B /* ZYImageSectionCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ZYImageSectionCell.m; sourceTree = "<group>"; };
138+
04D9019D204D8A9A00B1601B /* ZYImageSectionCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ZYImageSectionCell.xib; sourceTree = "<group>"; };
139+
04D901A0204E2E8C00B1601B /* ZYFTopicCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ZYFTopicCell.h; sourceTree = "<group>"; };
140+
04D901A1204E2E8C00B1601B /* ZYFTopicCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ZYFTopicCell.m; sourceTree = "<group>"; };
141+
04D901A2204E2E8C00B1601B /* ZYFTopicCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ZYFTopicCell.xib; sourceTree = "<group>"; };
142+
04D901A5204E364400B1601B /* ZYFInfoCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ZYFInfoCell.h; sourceTree = "<group>"; };
143+
04D901A6204E364400B1601B /* ZYFInfoCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ZYFInfoCell.m; sourceTree = "<group>"; };
144+
04D901A7204E364400B1601B /* ZYFInfoCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ZYFInfoCell.xib; sourceTree = "<group>"; };
145+
04D901AA204E42D100B1601B /* ZYFGodReviewsCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ZYFGodReviewsCell.h; sourceTree = "<group>"; };
146+
04D901AB204E42D100B1601B /* ZYFGodReviewsCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ZYFGodReviewsCell.m; sourceTree = "<group>"; };
147+
04D901AC204E42D100B1601B /* ZYFGodReviewsCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ZYFGodReviewsCell.xib; sourceTree = "<group>"; };
148+
04D901AF204E79FB00B1601B /* ZYFGodReviewsSC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ZYFGodReviewsSC.h; sourceTree = "<group>"; };
149+
04D901B0204E79FB00B1601B /* ZYFGodReviewsSC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ZYFGodReviewsSC.m; sourceTree = "<group>"; };
150+
04D901B3204FE98700B1601B /* IGListDisplayDelegateM.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = IGListDisplayDelegateM.h; sourceTree = "<group>"; };
151+
04D901B4204FE98700B1601B /* IGListDisplayDelegateM.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = IGListDisplayDelegateM.m; sourceTree = "<group>"; };
120152
0EBB26D853BD2B44B20E7CF4 /* Pods-ZuiYou.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ZuiYou.debug.xcconfig"; path = "Pods/Target Support Files/Pods-ZuiYou/Pods-ZuiYou.debug.xcconfig"; sourceTree = "<group>"; };
121153
935B330EAF592B08736656DC /* libPods-ZuiYou.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-ZuiYou.a"; sourceTree = BUILT_PRODUCTS_DIR; };
122154
F78EE6DA7B4748152339D3BB /* Pods-ZuiYou.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ZuiYou.release.xcconfig"; path = "Pods/Target Support Files/Pods-ZuiYou/Pods-ZuiYou.release.xcconfig"; sourceTree = "<group>"; };
@@ -290,6 +322,7 @@
290322
0411F98620469E79000A1E31 /* Common */ = {
291323
isa = PBXGroup;
292324
children = (
325+
04D901B2204FE8FD00B1601B /* IGListExtension */,
293326
0411F98B20469F5E000A1E31 /* Lib */,
294327
0411F9B32047E502000A1E31 /* MJRefresh */,
295328
0411F98720469F5D000A1E31 /* Navigation */,
@@ -461,6 +494,18 @@
461494
04A22FAB20492C52006290B4 /* ZYFImageCell.h */,
462495
04A22FAC20492C52006290B4 /* ZYFImageCell.m */,
463496
04A22FAD20492C52006290B4 /* ZYFImageCell.xib */,
497+
04D9019B204D8A9A00B1601B /* ZYImageSectionCell.h */,
498+
04D9019C204D8A9A00B1601B /* ZYImageSectionCell.m */,
499+
04D9019D204D8A9A00B1601B /* ZYImageSectionCell.xib */,
500+
04D901A0204E2E8C00B1601B /* ZYFTopicCell.h */,
501+
04D901A1204E2E8C00B1601B /* ZYFTopicCell.m */,
502+
04D901A2204E2E8C00B1601B /* ZYFTopicCell.xib */,
503+
04D901A5204E364400B1601B /* ZYFInfoCell.h */,
504+
04D901A6204E364400B1601B /* ZYFInfoCell.m */,
505+
04D901A7204E364400B1601B /* ZYFInfoCell.xib */,
506+
04D901AA204E42D100B1601B /* ZYFGodReviewsCell.h */,
507+
04D901AB204E42D100B1601B /* ZYFGodReviewsCell.m */,
508+
04D901AC204E42D100B1601B /* ZYFGodReviewsCell.xib */,
464509
);
465510
path = Cell;
466511
sourceTree = "<group>";
@@ -470,6 +515,10 @@
470515
children = (
471516
04A22FB120493866006290B4 /* ZYFeaturedSC.h */,
472517
04A22FB220493866006290B4 /* ZYFeaturedSC.m */,
518+
04A22FCD204CF096006290B4 /* ZYImageSC.h */,
519+
04A22FCE204CF096006290B4 /* ZYImageSC.m */,
520+
04D901AF204E79FB00B1601B /* ZYFGodReviewsSC.h */,
521+
04D901B0204E79FB00B1601B /* ZYFGodReviewsSC.m */,
473522
);
474523
path = SectionController;
475524
sourceTree = "<group>";
@@ -478,10 +527,21 @@
478527
isa = PBXGroup;
479528
children = (
480529
04A22FC9204A7AFE006290B4 /* UICollectionViewCell+ZYExtension.h */,
530+
04D90198204D655900B1601B /* NSArray+IGListDiffable.h */,
531+
04D90199204D655900B1601B /* NSArray+IGListDiffable.m */,
481532
);
482533
path = Other;
483534
sourceTree = "<group>";
484535
};
536+
04D901B2204FE8FD00B1601B /* IGListExtension */ = {
537+
isa = PBXGroup;
538+
children = (
539+
04D901B3204FE98700B1601B /* IGListDisplayDelegateM.h */,
540+
04D901B4204FE98700B1601B /* IGListDisplayDelegateM.m */,
541+
);
542+
path = IGListExtension;
543+
sourceTree = "<group>";
544+
};
485545
8AE26E06D3E1DB20848BCD70 /* Frameworks */ = {
486546
isa = PBXGroup;
487547
children = (
@@ -593,9 +653,13 @@
593653
0411F95F20468FC8000A1E31 /* Main.storyboard in Resources */,
594654
04A22FBB204A350A006290B4 /* detail.json in Resources */,
595655
0411F9C72048E110000A1E31 /* list.json in Resources */,
656+
04D901A9204E364400B1601B /* ZYFInfoCell.xib in Resources */,
657+
04D9019F204D8A9A00B1601B /* ZYImageSectionCell.xib in Resources */,
658+
04D901A4204E2E8C00B1601B /* ZYFTopicCell.xib in Resources */,
596659
0411F9C62048E110000A1E31 /* topic.json in Resources */,
597660
0411F9D12049299B000A1E31 /* ZYAvatarCell.xib in Resources */,
598661
04A22FAA20492B6D006290B4 /* ZYFTitleCell.xib in Resources */,
662+
04D901AE204E42D100B1601B /* ZYFGodReviewsCell.xib in Resources */,
599663
0411F9C42048E110000A1E31 /* Profile.json in Resources */,
600664
);
601665
runOnlyForDeploymentPostprocessing = 0;
@@ -666,13 +730,17 @@
666730
0411F9B62047E515000A1E31 /* LEDIYHeader.m in Sources */,
667731
04A22FB320493866006290B4 /* ZYFeaturedSC.m in Sources */,
668732
04A22FAE20492C52006290B4 /* ZYFImageCell.m in Sources */,
733+
04A22FCF204CF096006290B4 /* ZYImageSC.m in Sources */,
669734
0411F9B22047D357000A1E31 /* UIView+LEBadge.m in Sources */,
735+
04D9019E204D8A9A00B1601B /* ZYImageSectionCell.m in Sources */,
670736
0411F96720468FC8000A1E31 /* main.m in Sources */,
671737
0411F9B12047D357000A1E31 /* RKNotificationHub.m in Sources */,
672738
0411F9B92047E73F000A1E31 /* ZYFeaturedVC.m in Sources */,
739+
04D901AD204E42D100B1601B /* ZYFGodReviewsCell.m in Sources */,
673740
0411F98F2046AE84000A1E31 /* UINavigationController+FDFullscreenPopGesture.m in Sources */,
674741
0411F9A22047A9A6000A1E31 /* LETabBarController.m in Sources */,
675742
04A22FA920492B6D006290B4 /* ZYFTitleCell.m in Sources */,
743+
04D901B1204E79FB00B1601B /* ZYFGodReviewsSC.m in Sources */,
676744
04A22FB6204947CA006290B4 /* ZYFeaturedM.m in Sources */,
677745
04A22FBE204A42BB006290B4 /* ZYImagesM.m in Sources */,
678746
04A22FC4204A6A38006290B4 /* ZYGodReviewsM.m in Sources */,
@@ -681,9 +749,13 @@
681749
0411F9AB2047CA07000A1E31 /* LETabBarButton.m in Sources */,
682750
0411F95920468FC8000A1E31 /* AppDelegate.m in Sources */,
683751
0411F9A52047C8B0000A1E31 /* LETabBarView.m in Sources */,
752+
04D901A3204E2E8C00B1601B /* ZYFTopicCell.m in Sources */,
684753
04A22FB9204953A3006290B4 /* ZYFeaturedService.m in Sources */,
685754
04A22FC1204A49D6006290B4 /* ZYMemberM.m in Sources */,
686755
0411F9A82047C9F3000A1E31 /* LEButton.m in Sources */,
756+
04D901A8204E364400B1601B /* ZYFInfoCell.m in Sources */,
757+
04D9019A204D655900B1601B /* NSArray+IGListDiffable.m in Sources */,
758+
04D901B5204FE98700B1601B /* IGListDisplayDelegateM.m in Sources */,
687759
);
688760
runOnlyForDeploymentPostprocessing = 0;
689761
};

ZuiYou/ZuiYou.xcworkspace/xcuserdata/mac.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,37 @@
1919
landmarkType = "7">
2020
</BreakpointContent>
2121
</BreakpointProxy>
22+
<BreakpointProxy
23+
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
24+
<BreakpointContent
25+
shouldBeEnabled = "No"
26+
ignoreCount = "0"
27+
continueAfterRunningActions = "No"
28+
filePath = "ZuiYou/Class/Featured/UI/SectionController/ZYFeaturedSC.m"
29+
timestampString = "542184262.80476"
30+
startingColumnNumber = "9223372036854775807"
31+
endingColumnNumber = "9223372036854775807"
32+
startingLineNumber = "200"
33+
endingLineNumber = "200"
34+
landmarkName = "-setupIGListDisplayDelegate"
35+
landmarkType = "7">
36+
</BreakpointContent>
37+
</BreakpointProxy>
38+
<BreakpointProxy
39+
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
40+
<BreakpointContent
41+
shouldBeEnabled = "No"
42+
ignoreCount = "0"
43+
continueAfterRunningActions = "No"
44+
filePath = "ZuiYou/Class/Featured/UI/SectionController/ZYFeaturedSC.m"
45+
timestampString = "542184262.80484"
46+
startingColumnNumber = "9223372036854775807"
47+
endingColumnNumber = "9223372036854775807"
48+
startingLineNumber = "194"
49+
endingLineNumber = "194"
50+
landmarkName = "-setupIGListDisplayDelegate"
51+
landmarkType = "7">
52+
</BreakpointContent>
53+
</BreakpointProxy>
2254
</Breakpoints>
2355
</Bucket>
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
//
2+
// IGListDisplayDelegateM.h
3+
// ZuiYou
4+
//
5+
// Created by mac on 2018/3/7.
6+
// Copyright © 2018年 le. All rights reserved.
7+
//
8+
9+
#import <Foundation/Foundation.h>
10+
#import <IGListDisplayDelegate.h>
11+
@class IGListAdapter, IGListSectionController, UICollectionViewCell;
12+
13+
@interface IGListDisplayDelegateM : NSObject <IGListDisplayDelegate>
14+
15+
@property(nonatomic, copy) void(^bIGListSectionControllerWillDisplay)(IGListAdapter *listAdapter, IGListSectionController *sectionController);
16+
17+
@property(nonatomic, copy) void(^bIGListSectionControllerDidDisplay)(IGListAdapter *listAdapter, IGListSectionController *sectionController);
18+
19+
@property(nonatomic, copy) void(^bIGListCellWillDisplay)(IGListAdapter *listAdapter, IGListSectionController *sectionController, UICollectionViewCell *cell, NSUInteger index);
20+
21+
@property(nonatomic, copy) void(^bIGListCellDidDisplay)(IGListAdapter *listAdapter, IGListSectionController *sectionController, UICollectionViewCell *cell, NSUInteger index);
22+
23+
@property(nonatomic, copy) void(^bIGListSectionControllerDidEndDisplaying)(IGListAdapter *listAdapter, IGListSectionController *sectionController);
24+
25+
@property(nonatomic, copy) void(^bIGListCellDidEndDisplaying)(IGListAdapter *listAdapter, IGListSectionController *sectionController, UICollectionViewCell *cell, NSUInteger index);
26+
27+
@end
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
//
2+
// IGListDisplayDelegateM.m
3+
// ZuiYou
4+
//
5+
// Created by mac on 2018/3/7.
6+
// Copyright © 2018年 le. All rights reserved.
7+
//
8+
9+
#import "IGListDisplayDelegateM.h"
10+
11+
@interface IGListDisplayDelegateM ()
12+
13+
///展示中的IGListSectionController
14+
@property(nonatomic, strong) IGListSectionController *visibleSectionController;
15+
///展示中的cell
16+
@property(nonatomic, strong) UICollectionViewCell *visibleCell;
17+
@property(nonatomic, assign) NSUInteger visibleIndex;
18+
19+
@end
20+
21+
@implementation IGListDisplayDelegateM
22+
23+
- (void)listAdapter:(nonnull IGListAdapter *)listAdapter didEndDisplayingSectionController:(nonnull IGListSectionController *)sectionController {
24+
if (self.visibleSectionController && sectionController != self.visibleSectionController) {
25+
if (self.bIGListSectionControllerDidDisplay) self.bIGListSectionControllerDidDisplay(listAdapter, self.visibleSectionController);
26+
}
27+
if (self.bIGListSectionControllerDidEndDisplaying) self.bIGListSectionControllerDidEndDisplaying(listAdapter, sectionController);
28+
}
29+
30+
- (void)listAdapter:(nonnull IGListAdapter *)listAdapter didEndDisplayingSectionController:(nonnull IGListSectionController *)sectionController cell:(nonnull UICollectionViewCell *)cell atIndex:(NSInteger)index {
31+
if (sectionController != self.visibleSectionController) {
32+
if (self.bIGListCellDidDisplay) self.bIGListCellDidDisplay(listAdapter, self.visibleSectionController, self.visibleCell, self.visibleIndex);
33+
}
34+
if (self.bIGListCellDidEndDisplaying) self.bIGListCellDidEndDisplaying(listAdapter, sectionController, cell, index);
35+
}
36+
37+
- (void)listAdapter:(nonnull IGListAdapter *)listAdapter willDisplaySectionController:(nonnull IGListSectionController *)sectionController {
38+
self.visibleSectionController = sectionController;
39+
if (self.bIGListSectionControllerWillDisplay) self.bIGListSectionControllerWillDisplay(listAdapter, sectionController);
40+
}
41+
42+
- (void)listAdapter:(nonnull IGListAdapter *)listAdapter willDisplaySectionController:(nonnull IGListSectionController *)sectionController cell:(nonnull UICollectionViewCell *)cell atIndex:(NSInteger)index {
43+
if (self.visibleSectionController) {
44+
if (self.bIGListCellWillDisplay) self.bIGListCellWillDisplay(listAdapter, sectionController, cell, index);
45+
}
46+
self.visibleSectionController = sectionController;
47+
self.visibleCell = cell;
48+
self.visibleIndex = index;
49+
}
50+
51+
@end

ZuiYou/ZuiYou/Class/Featured/Model/ZYFeaturedCellM.h

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
#import <Foundation/Foundation.h>
1010
@import UIKit;
11+
@class IGListSectionController;
1112

1213
@interface ZYFeaturedCellM : NSObject
1314

@@ -17,18 +18,25 @@
1718
@property(nonatomic, strong, readonly) NSString *cellName;
1819

1920
/**
20-
高度
21+
cell size
2122
*/
23+
@property(nonatomic, assign) CGSize cellSize;
2224
@property(nonatomic, assign) CGFloat cellHeight;
25+
@property(nonatomic, assign) CGFloat cellWidth;
2326

2427
/**
2528
数据源
2629
*/
2730
@property(nonatomic, strong) id dataSource;
2831

32+
/**
33+
IGListSectionController
34+
*/
35+
@property(nonatomic, strong) IGListSectionController *sectionController;
36+
2937
/**
3038
初始化
3139
*/
32-
- (instancetype)initWithCellName:(NSString *)cellName cellHeight:(CGFloat)cellHeight dataSource:(id)dataSource;
40+
- (instancetype)initWithCellName:(NSString *)cellName cellSize:(CGSize)cellSize dataSource:(id)dataSource;
3341

3442
@end

ZuiYou/ZuiYou/Class/Featured/Model/ZYFeaturedCellM.m

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,29 @@ @implementation ZYFeaturedCellM
1313
/**
1414
初始化
1515
*/
16-
- (instancetype)initWithCellName:(NSString *)cellName cellHeight:(CGFloat)cellHeight dataSource:(id)dataSource {
16+
- (instancetype)initWithCellName:(NSString *)cellName cellSize:(CGSize)cellSize dataSource:(id)dataSource {
1717
if (self == [super init]) {
1818
_cellName = cellName;
19-
_cellHeight = cellHeight;
19+
_cellSize = cellSize;
2020
_dataSource = dataSource;
2121
}
2222
return self;
2323
}
2424

25+
- (void)setCellHeight:(CGFloat)cellHeight {
26+
self.cellSize = CGSizeMake(self.cellSize.width, cellHeight);
27+
}
28+
29+
- (CGFloat)cellHeight {
30+
return self.cellSize.height;
31+
}
32+
33+
- (void)setCellWidth:(CGFloat)cellWidth {
34+
self.cellSize = CGSizeMake(cellWidth, self.cellSize.height);
35+
}
36+
37+
- (CGFloat)cellWidth {
38+
return self.cellSize.width;
39+
}
40+
2541
@end

ZuiYou/ZuiYou/Class/Featured/Model/ZYGodReviewsM.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@
77
//
88

99
#import <Foundation/Foundation.h>
10+
#import <IGListDiffable.h>
1011
@class ZYImagesM, ZYVideosM;
1112

12-
@interface ZYGodReviewsM : NSObject
13+
@interface ZYGodReviewsM : NSObject <IGListDiffable>
1314

1415
/**
1516
"_id":339948764,

ZuiYou/ZuiYou/Class/Featured/Model/ZYGodReviewsM.m

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,15 @@ - (id)mj_newValueFromOldValue:(id)oldValue property:(MJProperty *)property {
4545
return oldValue;
4646
}
4747

48+
#pragma mark - IGListDiffable
49+
50+
- (id<NSObject>)diffIdentifier {
51+
return self;
52+
}
53+
54+
- (BOOL)isEqualToDiffableObject:(id)object {
55+
// since the diff identifier returns self, object should only be compared with same instance
56+
return self == object;
57+
}
58+
4859
@end

ZuiYou/ZuiYou/Class/Featured/Model/ZYImagesM.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@
77
//
88

99
#import <Foundation/Foundation.h>
10+
#import <IGListDiffable.h>
1011

11-
@interface ZYImagesM : NSObject
12+
@interface ZYImagesM : NSObject <IGListDiffable>
1213

1314
@property(nonatomic, copy) NSString *uid;
1415
@property(nonatomic, copy) NSString *h;
@@ -20,7 +21,7 @@
2021
@end
2122

2223

23-
@interface ZYVideosM : NSObject
24+
@interface ZYVideosM : NSObject <IGListDiffable>
2425

2526
/**
2627
"dur": 223,

0 commit comments

Comments
 (0)