├── GIF
└── JYJForm.gif
├── JYJForm
├── JYJForm.xcodeproj
│ ├── project.xcworkspace
│ │ └── contents.xcworkspacedata
│ └── project.pbxproj
└── JYJForm
│ ├── ViewController.h
│ ├── AppDelegate.h
│ ├── JYJConst.m
│ ├── main.m
│ ├── JYJForm
│ ├── JYJCollectionViewCell.h
│ ├── JYJTableCell.h
│ ├── JYJWaterFlowLayout.h
│ ├── JYJWaterFlowLayout.m
│ ├── JYJTableCell.m
│ └── JYJCollectionViewCell.m
│ ├── JYJConst.h
│ ├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
│ ├── UIView+Extension.h
│ ├── Info.plist
│ ├── Base.lproj
│ ├── Main.storyboard
│ └── LaunchScreen.storyboard
│ ├── AppDelegate.m
│ ├── UIView+Extension.m
│ └── ViewController.m
├── README.md
├── LICENSE
└── .gitignore
/GIF/JYJForm.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jiangyongjian/JYJForm/HEAD/GIF/JYJForm.gif
--------------------------------------------------------------------------------
/JYJForm/JYJForm.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # JYJForm
2 | 画表格。
3 |
4 | # GIF
5 | 
6 |
7 | # message
8 | `JYJForm` 用collectionView写的,不用自己画。想怎么搞就怎么搞,妈妈再也不用担心我画表格了。
9 |
10 | # 联系我
11 | QQ 453255376, 如有bug、不明白的,希望大家踊跃联系我,把程序写的更好。
12 |
13 |
--------------------------------------------------------------------------------
/JYJForm/JYJForm/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // JYJForm
4 | //
5 | // Created by JYJ on 17/1/22.
6 | // Copyright © 2017年 baobeikeji. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/JYJForm/JYJForm/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // JYJForm
4 | //
5 | // Created by JYJ on 17/1/22.
6 | // Copyright © 2017年 baobeikeji. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/JYJForm/JYJForm/JYJConst.m:
--------------------------------------------------------------------------------
1 | //
2 | // JYJConst.m
3 | // BaoXianDaiDai
4 | //
5 | // Created by JYJ on 15/11/9.
6 | // Copyright © 2015年 17maibaoxian.cn. All rights reserved.
7 | //
8 |
9 |
10 | #import
11 |
12 |
13 | /***********************处理表格的高度***********************/
14 | /** 对应collectionCell的高度 */
15 | CGFloat const itemCellH = 30;
16 |
17 |
18 |
--------------------------------------------------------------------------------
/JYJForm/JYJForm/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // JYJForm
4 | //
5 | // Created by JYJ on 17/1/22.
6 | // Copyright © 2017年 baobeikeji. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/JYJForm/JYJForm/JYJForm/JYJCollectionViewCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // JYJCollectionViewCell.h
3 | // MaiBaoXian
4 | //
5 | // Created by JYJ on 17/1/21.
6 | // Copyright © 2017年 17maibaoxian.cn. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface JYJCollectionViewCell : UICollectionViewCell
12 | //赋值的方法
13 | - (void)setDataFunction:(NSIndexPath *)path andTotalPath:(NSIndexPath *)TotalPath andTitle:(NSString *)title;
14 | @end
15 |
--------------------------------------------------------------------------------
/JYJForm/JYJForm/JYJForm/JYJTableCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // JYJTableCell.h
3 | // MaiBaoXian
4 | //
5 | // Created by JYJ on 17/1/21.
6 | // Copyright © 2017年 17maibaoxian.cn. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface JYJTableCell : UITableViewCell
12 | /** 数据 */
13 | @property (nonatomic, strong) NSArray *data;
14 |
15 | /** 宽度 */
16 | @property (nonatomic, strong) NSArray *widthArray;
17 |
18 |
19 | + (instancetype)cellWithTableView:(UITableView *)tableView;
20 | @end
21 |
--------------------------------------------------------------------------------
/JYJForm/JYJForm/JYJConst.h:
--------------------------------------------------------------------------------
1 | //
2 | // JYJConst.h
3 | // BaoXianDaiDai
4 | //
5 | // Created by JYJ on 15/11/9.
6 | // Copyright © 2015年 17maibaoxian.cn. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 |
12 | // 设置颜色
13 | #define JYJColor(r, g, b) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1.0]
14 | #define JYJScreenH [UIScreen mainScreen].bounds.size.height
15 | #define JYJScreenW [UIScreen mainScreen].bounds.size.width
16 |
17 |
18 | /***********************处理表格的高度***********************/
19 | /** 对应collectionCell的高度 */
20 | UIKIT_EXTERN CGFloat const itemCellH;
21 |
--------------------------------------------------------------------------------
/JYJForm/JYJForm/JYJForm/JYJWaterFlowLayout.h:
--------------------------------------------------------------------------------
1 | //
2 | // JYJWaterFlowLayout.h
3 | // 瀑布流
4 | //
5 | // Created by JYJ on 15/11/20.
6 | // Copyright © 2015年 com.shuai. All rights reserved.
7 | //
8 |
9 | #import
10 | @class JYJWaterFlowLayout;
11 | @protocol JYJWaterFlowLayoutDelegate
12 |
13 | // 计算item高度
14 | - (CGFloat)waterFlow:(JYJWaterFlowLayout *)waterFlow cellIndexPath:(NSIndexPath *)indexPath;
15 |
16 | @end
17 |
18 | @interface JYJWaterFlowLayout : UICollectionViewFlowLayout
19 |
20 | //数据源 从中可以获得每个cell的宽高 和 一共有多少个cell
21 | @property(nonatomic,strong) NSArray *widthArray;
22 |
23 | @property(nonatomic,weak) id delegate;
24 | @end
25 |
--------------------------------------------------------------------------------
/JYJForm/JYJForm/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2017
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/JYJForm/JYJForm/UIView+Extension.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIView+Extension.h
3 | // 01-黑酷
4 | //
5 | // Created by apple on 14-6-27.
6 | // Copyright (c) 2014年 heima. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 |
12 | @interface UIView (Extension)
13 | @property (nonatomic, assign) CGFloat x;
14 | @property (nonatomic, assign) CGFloat y;
15 | @property (nonatomic, assign) CGFloat width;
16 | @property (nonatomic, assign) CGFloat height;
17 | @property (nonatomic, assign) CGSize size;
18 | @property (nonatomic, assign) CGPoint origin;
19 | @property (nonatomic, assign) CGFloat centerX;
20 | @property (nonatomic, assign) CGFloat centerY;
21 |
22 |
23 | /**
24 | * 9.上 < Shortcut for frame.origin.y
25 | */
26 | @property (nonatomic) CGFloat top;
27 |
28 | /**
29 | * 10.下 < Shortcut for frame.origin.y + frame.size.height
30 | */
31 | @property (nonatomic) CGFloat bottom;
32 |
33 | /**
34 | * 11.左 < Shortcut for frame.origin.x.
35 | */
36 | @property (nonatomic) CGFloat left;
37 |
38 | /**
39 | * 12.右 < Shortcut for frame.origin.x + frame.size.width
40 | */
41 | @property (nonatomic) CGFloat right;
42 |
43 | /**
44 | * 自己写的view添加事件
45 | */
46 | - (void)addTarget:(id)target action:(SEL)action;
47 | @end
48 |
--------------------------------------------------------------------------------
/JYJForm/JYJForm/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Xcode
2 | #
3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
4 |
5 | ## Build generated
6 | build/
7 | DerivedData/
8 |
9 | ## Various settings
10 | *.pbxuser
11 | !default.pbxuser
12 | *.mode1v3
13 | !default.mode1v3
14 | *.mode2v3
15 | !default.mode2v3
16 | *.perspectivev3
17 | !default.perspectivev3
18 | xcuserdata/
19 |
20 | ## Other
21 | *.moved-aside
22 | *.xcuserstate
23 |
24 | ## Obj-C/Swift specific
25 | *.hmap
26 | *.ipa
27 | *.dSYM.zip
28 | *.dSYM
29 |
30 | # CocoaPods
31 | #
32 | # We recommend against adding the Pods directory to your .gitignore. However
33 | # you should judge for yourself, the pros and cons are mentioned at:
34 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
35 | #
36 | # Pods/
37 |
38 | # Carthage
39 | #
40 | # Add this line if you want to avoid checking in source code from Carthage dependencies.
41 | # Carthage/Checkouts
42 |
43 | Carthage/Build
44 |
45 | # fastlane
46 | #
47 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
48 | # screenshots whenever they are needed.
49 | # For more information about the recommended setup visit:
50 | # https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md
51 |
52 | fastlane/report.xml
53 | fastlane/screenshots
54 |
55 | #Code Injection
56 | #
57 | # After new code Injection tools there's a generated folder /iOSInjectionProject
58 | # https://github.com/johnno1962/injectionforxcode
59 |
60 | iOSInjectionProject/
61 |
--------------------------------------------------------------------------------
/JYJForm/JYJForm/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/JYJForm/JYJForm/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/JYJForm/JYJForm/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // JYJForm
4 | //
5 | // Created by JYJ on 17/1/22.
6 | // Copyright © 2017年 baobeikeji. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 |
11 | @interface AppDelegate ()
12 |
13 | @end
14 |
15 | @implementation AppDelegate
16 |
17 |
18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
19 | // Override point for customization after application launch.
20 | return YES;
21 | }
22 |
23 |
24 | - (void)applicationWillResignActive:(UIApplication *)application {
25 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
26 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
27 | }
28 |
29 |
30 | - (void)applicationDidEnterBackground:(UIApplication *)application {
31 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
32 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
33 | }
34 |
35 |
36 | - (void)applicationWillEnterForeground:(UIApplication *)application {
37 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
38 | }
39 |
40 |
41 | - (void)applicationDidBecomeActive:(UIApplication *)application {
42 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
43 | }
44 |
45 |
46 | - (void)applicationWillTerminate:(UIApplication *)application {
47 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
48 | }
49 |
50 |
51 | @end
52 |
--------------------------------------------------------------------------------
/JYJForm/JYJForm/UIView+Extension.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIView+Extension.m
3 | // 01-黑酷
4 | //
5 | // Created by apple on 14-6-27.
6 | // Copyright (c) 2014年 heima. All rights reserved.
7 | //
8 |
9 | #import "UIView+Extension.h"
10 |
11 | @implementation UIView (Extension)
12 |
13 | - (void)setX:(CGFloat)x {
14 | CGRect frame = self.frame;
15 | frame.origin.x = x;
16 | self.frame = frame;
17 | }
18 |
19 | - (CGFloat)x {
20 | return self.frame.origin.x;
21 | }
22 |
23 | - (void)setY:(CGFloat)y {
24 | CGRect frame = self.frame;
25 | frame.origin.y = y;
26 | self.frame = frame;
27 | }
28 |
29 | - (CGFloat)y {
30 | return self.frame.origin.y;
31 | }
32 |
33 | - (void)setWidth:(CGFloat)width {
34 | CGRect frame = self.frame;
35 | frame.size.width = width;
36 | self.frame = frame;
37 | }
38 |
39 | - (CGFloat)width {
40 | return self.frame.size.width;
41 | }
42 |
43 | - (void)setHeight:(CGFloat)height {
44 | CGRect frame = self.frame;
45 | frame.size.height = height;
46 | self.frame = frame;
47 | }
48 |
49 | - (CGFloat)height {
50 | return self.frame.size.height;
51 | }
52 |
53 | - (void)setSize:(CGSize)size {
54 | // self.width = size.width;
55 | // self.height = size.height;
56 | CGRect frame = self.frame;
57 | frame.size = size;
58 | self.frame = frame;
59 | }
60 |
61 | - (CGSize)size {
62 | return self.frame.size;
63 | }
64 |
65 | - (void)setOrigin:(CGPoint)origin {
66 | CGRect frame = self.frame;
67 | frame.origin = origin;
68 | self.frame = frame;
69 | }
70 |
71 | - (CGPoint)origin {
72 | return self.frame.origin;
73 | }
74 |
75 | - (void)setCenterX:(CGFloat)centerX {
76 | CGPoint center = self.center;
77 | center.x = centerX;
78 | self.center = center;
79 | }
80 |
81 | - (CGFloat)centerX {
82 | return self.center.x;
83 | }
84 |
85 | - (void)setCenterY:(CGFloat)centerY {
86 | CGPoint center = self.center;
87 | center.y = centerY;
88 | self.center = center;
89 | }
90 |
91 | - (CGFloat)centerY {
92 | return self.center.y;
93 | }
94 |
95 |
96 | - (CGFloat)left {
97 | return self.frame.origin.x;
98 | }
99 |
100 | - (void)setLeft:(CGFloat)x {
101 | CGRect frame = self.frame;
102 | frame.origin.x = x;
103 | self.frame = frame;
104 | }
105 |
106 | - (CGFloat)top {
107 | return self.frame.origin.y;
108 | }
109 |
110 | - (void)setTop:(CGFloat)y {
111 | CGRect frame = self.frame;
112 | frame.origin.y = y;
113 | self.frame = frame;
114 | }
115 |
116 | - (CGFloat)right {
117 | return self.frame.origin.x + self.frame.size.width;
118 | }
119 |
120 | - (void)setRight:(CGFloat)right {
121 | CGRect frame = self.frame;
122 | frame.origin.x = right - frame.size.width;
123 | self.frame = frame;
124 | }
125 |
126 | - (CGFloat)bottom {
127 | return self.frame.origin.y + self.frame.size.height;
128 | }
129 |
130 | - (void)setBottom:(CGFloat)bottom {
131 | CGRect frame = self.frame;
132 | frame.origin.y = bottom - frame.size.height;
133 | self.frame = frame;
134 | }
135 |
136 |
137 |
138 | - (void)addTarget:(id)target action:(SEL)action;
139 | {
140 | UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:target
141 | action:action];
142 | self.userInteractionEnabled = YES;
143 | [self addGestureRecognizer:tap];
144 | }
145 |
146 | @end
147 |
--------------------------------------------------------------------------------
/JYJForm/JYJForm/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // JYJForm
4 | //
5 | // Created by JYJ on 17/1/22.
6 | // Copyright © 2017年 baobeikeji. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 | #import "JYJTableCell.h"
11 | #import "JYJConst.h"
12 |
13 | @interface ViewController ()
14 | /** tableView */
15 | @property (nonatomic, weak) UITableView *tableView;
16 | /** 数据 */
17 | @property (nonatomic, strong) NSMutableArray *data1;
18 |
19 | @property (nonatomic, strong) NSMutableArray *data2;
20 |
21 | /** 宽度 */
22 | @property (nonatomic, strong) NSArray *widthArray1;
23 | @property (nonatomic, strong) NSArray *widthArray2;
24 | @end
25 |
26 | @implementation ViewController
27 |
28 | - (void)viewDidLoad {
29 | [super viewDidLoad];
30 | UITableView *tableView = [[UITableView alloc] init];
31 | tableView.frame = CGRectMake(0, 0, JYJScreenW, JYJScreenH);
32 | tableView.delegate = self;
33 | tableView.dataSource = self;
34 | tableView.backgroundColor = JYJColor(235, 235, 235);
35 | tableView.showsVerticalScrollIndicator = NO;
36 | tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
37 | [self.view addSubview:tableView];
38 | tableView.contentInset = UIEdgeInsetsMake(64, 0, 0, 0);
39 | self.tableView = tableView;
40 |
41 | UILabel *label = [[UILabel alloc] init];
42 | label.text = @"觉得牛逼请点个赞";
43 | label.textColor = [UIColor redColor];
44 | label.font = [UIFont systemFontOfSize:25];
45 | label.frame = CGRectMake(0, JYJScreenH - 100, JYJScreenW, 100);
46 | label.textAlignment = NSTextAlignmentCenter;
47 | [self.view addSubview:label];
48 | [self setupdata];
49 |
50 |
51 | }
52 |
53 | - (void)setupdata {
54 | NSArray *arr = @[@[@"尺寸",@"非常好",@"灰色垃圾",@"蓝色",@"红色"],
55 | @[@"SM",@"0000",@"10",@"2",@"02"],
56 | @[@"S",@"10",@"20",@"3",@"03"],
57 | @[@"MMMM",@"20",@"0",@"4",@"04"],
58 | @[@"L",@"0",@"20000",@"5",@"5"],
59 | @[@"XL",@"20",@"10",@"6",@"6"],
60 | @[@"XXL",@"10",@"10",@"7",@"7"],
61 | @[@"KKKK",@"10",@"10",@"8",@"8"],
62 | @[@"XXL",@"10",@"10",@"9",@"9"],
63 | @[@"总计",@"60",@"70",@"10",@"10"]];//二维数组
64 | // 这里的数据源 必定是二维数组
65 | self.data1 = [arr mutableCopy];
66 | self.data2 = [arr mutableCopy];
67 | // 跟着每组最大的宽度设置
68 | self.widthArray1 = @[@80, @120, @100, @140, @80, @100, @160, @200,@80, @140];
69 | self.widthArray2 = @[@100, @180, @100, @180, @80, @100, @200, @100,@80, @100];
70 | }
71 |
72 | #pragma mark - Table view data source
73 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
74 | return 2;
75 | }
76 |
77 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
78 | JYJTableCell *cell = [JYJTableCell cellWithTableView:tableView];
79 | if (indexPath.row == 0) {
80 | cell.data = self.data1;
81 | cell.widthArray = self.widthArray1;
82 | } else {
83 | cell.data = self.data2;
84 | cell.widthArray = self.widthArray2;
85 | }
86 | return cell;
87 | }
88 |
89 | - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
90 | if (indexPath.row == 0) {
91 | NSArray *arr = [self.data1 firstObject];
92 | return itemCellH * arr.count + 20;
93 | } else {
94 | NSArray *arr = [self.data2 firstObject];
95 | return itemCellH * arr.count + 20;
96 | }
97 | }
98 |
99 |
100 | - (void)didReceiveMemoryWarning {
101 | [super didReceiveMemoryWarning];
102 | // Dispose of any resources that can be recreated.
103 | }
104 |
105 |
106 | @end
107 |
--------------------------------------------------------------------------------
/JYJForm/JYJForm/JYJForm/JYJWaterFlowLayout.m:
--------------------------------------------------------------------------------
1 | //
2 | // JYJWaterFlowLayout.m
3 | // 瀑布流
4 | //
5 | // Created by JYJ on 15/11/20.
6 | // Copyright © 2015年 com.shuai. All rights reserved.
7 | //
8 |
9 | #import "JYJWaterFlowLayout.h"
10 | #import "JYJConst.h"
11 |
12 | @interface JYJWaterFlowLayout()
13 |
14 | //用来保存所有item
15 | @property(nonatomic,strong) NSMutableArray *attrArray;
16 |
17 | //用来保存每列最大Y值
18 | @property(nonatomic,strong) NSMutableDictionary *maxXDict;
19 |
20 | //用来保存最大X值
21 | @property(nonatomic,assign) CGFloat maxX;
22 |
23 | @end
24 |
25 | @implementation JYJWaterFlowLayout
26 |
27 |
28 | #pragma mark -- 实现瀑布流功能方法
29 |
30 | //当collectionView第一次要显示的时候会调用此方法来准备布局。
31 | //当collectionView的布局发生变化时,也会来调用此方法。
32 | //当刷新数据时,也会调用此方法。
33 |
34 | //在这个方法中计算每一个cell的位置大小(frame)
35 | - (void)prepareLayout{
36 | [super prepareLayout];
37 |
38 | // 清空,防止下次调用
39 | self.maxX = 0;
40 |
41 | //字典列值初始化 解决了 每次获取字典中最小值得问题。
42 | for(int i = 0;i *)layoutAttributesForElementsInRect:(CGRect)rect{
77 | // return [super layoutAttributesForElementsInRect:rect];
78 | return self.attrArray;
79 | }
80 |
81 | //返回某一个指定cell的属性 默认不会被调用 需要在 prepareLayout 方法中调用
82 | - (UICollectionViewLayoutAttributes *)layoutAttributesForItemAtIndexPath:(NSIndexPath *)indexPath{
83 |
84 | CGFloat cellH = itemCellH;
85 | //宽度计算方法
86 | CGFloat cellW = [self.delegate waterFlow:self cellIndexPath:indexPath];
87 |
88 | //X位置 计算方法
89 | //要求出当前cell是哪一列,然后加上间距和边距就可以了
90 | NSString *key = [NSString stringWithFormat:@"%zd", indexPath.section];
91 | NSString *maxX = self.maxXDict[key];
92 | CGFloat cellX = [maxX floatValue];
93 |
94 | //Y位置 计算方法
95 | CGFloat cellY = cellH * indexPath.item;
96 |
97 | UICollectionViewLayoutAttributes *attrs = [UICollectionViewLayoutAttributes layoutAttributesForCellWithIndexPath:indexPath];
98 |
99 | attrs.frame = CGRectMake(cellX, cellY, cellW, cellH);
100 | NSLog(@"%@",attrs);
101 | return attrs;
102 | }
103 |
104 | #pragma mark -- 懒加载
105 |
106 | - (NSMutableArray *)attrArray{
107 | if(_attrArray == nil){
108 | _attrArray = [NSMutableArray array];
109 | }
110 | return _attrArray;
111 | }
112 |
113 | - (NSMutableDictionary *)maxXDict{
114 | if(_maxXDict == nil){
115 | _maxXDict = [NSMutableDictionary dictionary];
116 | }
117 | return _maxXDict;
118 | }
119 |
120 | @end
121 |
--------------------------------------------------------------------------------
/JYJForm/JYJForm/JYJForm/JYJTableCell.m:
--------------------------------------------------------------------------------
1 | //
2 | // JYJTableCell.m
3 | // MaiBaoXian
4 | //
5 | // Created by JYJ on 17/1/21.
6 | // Copyright © 2017年 17maibaoxian.cn. All rights reserved.
7 | //
8 |
9 | #import "JYJTableCell.h"
10 | #import "JYJTableCell.h"
11 | #import "JYJWaterFlowLayout.h"
12 | #import "JYJCollectionViewCell.h"
13 | #import "UIView+Extension.h"
14 | #import "JYJConst.h"
15 |
16 |
17 | /** CollectionViewCell */
18 | static NSString *const CollectionViewCell = @"CollectionViewCell";
19 |
20 | @interface JYJTableCell ()
21 |
22 | /** collectionView */
23 | @property (nonatomic, weak) UICollectionView *collectionView;
24 | /** flowLayout */
25 | @property (nonatomic, weak) JYJWaterFlowLayout *flowLayout;
26 |
27 | /** 背景 */
28 | @property (nonatomic, weak) UIView *bgView;
29 |
30 | @end
31 |
32 | @implementation JYJTableCell
33 |
34 | + (instancetype)cellWithTableView:(UITableView *)tableView {
35 | // 创建cell
36 | static NSString *ID = @"PersonDetailCell";
37 | JYJTableCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];
38 |
39 | if (cell == nil) {
40 | cell = [[JYJTableCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:ID];
41 | }
42 | cell.selectionStyle = UITableViewCellSelectionStyleNone;
43 | return cell;
44 | }
45 |
46 | - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
47 | if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
48 | // 初始化操作
49 | [self setupSubviews];
50 |
51 | }
52 | return self;
53 | }
54 |
55 | /**
56 | * 初始化子控件
57 | */
58 | - (void)setupSubviews {
59 |
60 | UIView *bgView = [[UIView alloc] init];
61 | bgView.backgroundColor = [UIColor whiteColor];
62 | [self.contentView addSubview:bgView];
63 | self.bgView = bgView;
64 |
65 | // 创建一个流水布局
66 | JYJWaterFlowLayout *flowLayout = [[JYJWaterFlowLayout alloc] init];
67 | flowLayout.scrollDirection = UICollectionViewScrollDirectionHorizontal;
68 | //cell间距
69 | flowLayout.minimumInteritemSpacing = 0;
70 | //cell行距
71 | flowLayout.minimumLineSpacing = 0;
72 | flowLayout.delegate = self;
73 |
74 | // 创建collectionView
75 | UICollectionView *collectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:flowLayout];
76 | // 注册一个cell
77 | [collectionView registerClass:[JYJCollectionViewCell class] forCellWithReuseIdentifier:CollectionViewCell];
78 | collectionView.backgroundColor = [UIColor whiteColor];
79 | collectionView.showsHorizontalScrollIndicator = NO;
80 | // 设置数据源对象
81 | collectionView.dataSource = self;
82 | collectionView.delegate = self;
83 | [self.contentView addSubview:collectionView];
84 | self.collectionView = collectionView;
85 | self.flowLayout = flowLayout;
86 |
87 | }
88 |
89 | - (void)setData:(NSArray *)data {
90 | _data = data;
91 | [self.collectionView reloadData];
92 | }
93 |
94 | - (void)setWidthArray:(NSArray *)widthArray {
95 | _widthArray = widthArray;
96 | self.flowLayout.widthArray = widthArray;
97 | [self.collectionView reloadData];
98 | }
99 |
100 | #pragma mark -- UICollectionViewDataSource 数据源方法
101 |
102 | //返回 一共有多少组
103 | - (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView{
104 | return self.data.count;
105 | }
106 |
107 | //返回 每组一共有多少item
108 | - (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{
109 | NSArray *arr = [self.data firstObject];
110 | return arr.count;
111 | }
112 |
113 | //返回 每个item具体样子
114 | - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{
115 | JYJCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:CollectionViewCell forIndexPath:indexPath];
116 | cell.backgroundColor = [UIColor whiteColor];
117 |
118 | NSArray *arr = self.data[indexPath.section];
119 | // 给cell设置数据
120 | [cell setDataFunction:indexPath andTotalPath:[NSIndexPath indexPathForRow:arr.count -1 inSection:self.data.count -1] andTitle:arr[indexPath.row]];
121 | return cell;
122 | }
123 |
124 |
125 | - (CGFloat)waterFlow:(JYJWaterFlowLayout *)waterFlow cellIndexPath:(NSIndexPath *)indexPath {
126 |
127 | return [self.widthArray[indexPath.section] floatValue];
128 | }
129 |
130 | /**
131 | * 设置子控件的frame
132 | */
133 | - (void)layoutSubviews {
134 | [super layoutSubviews];
135 | CGFloat cellH = self.contentView.height;
136 | CGFloat cellW = JYJScreenW;
137 |
138 | /** 背景 */
139 | CGFloat bgViewX = 10;
140 | CGFloat bgViewY = 10;
141 | CGFloat bgViewW = cellW - 2 * bgViewX;
142 | CGFloat bgViewH =cellH - 2 * bgViewY;
143 | self.bgView.frame = CGRectMake(bgViewX, bgViewY, bgViewW, bgViewH);
144 | self.collectionView.frame = self.bgView.frame;
145 | }
146 | @end
147 |
148 |
149 |
--------------------------------------------------------------------------------
/JYJForm/JYJForm/JYJForm/JYJCollectionViewCell.m:
--------------------------------------------------------------------------------
1 | //
2 | // JYJCollectionViewCell.m
3 | // MaiBaoXian
4 | //
5 | // Created by JYJ on 17/1/21.
6 | // Copyright © 2017年 17maibaoxian.cn. All rights reserved.
7 | //
8 |
9 | #import "JYJCollectionViewCell.h"
10 | #import "UIView+Extension.h"
11 | #import "JYJConst.h"
12 |
13 | @interface JYJCollectionViewCell ()
14 | /** titleLabel */
15 | @property (nonatomic, weak) UILabel *titleLabel;
16 |
17 | @property (nonatomic, weak) UIView *leftView;
18 | @property (nonatomic, weak) UIView *bottomView;
19 | @property (nonatomic, weak) UIView *rigthView;
20 | @property (nonatomic, weak) UIView *topView;
21 |
22 | @end
23 |
24 | @implementation JYJCollectionViewCell
25 | - (instancetype)initWithFrame:(CGRect)frame {
26 | self = [super initWithFrame:frame];
27 | if (self) {
28 | [self setup];
29 | }
30 | return self;
31 | }
32 |
33 | - (void)awakeFromNib {
34 | [super awakeFromNib];
35 | [self setup];
36 | }
37 |
38 | - (void)setup {
39 | self.backgroundColor = [UIColor whiteColor];
40 | self.layer.borderWidth = 0.5f;
41 | self.layer.borderColor = [UIColor blackColor].CGColor;
42 |
43 | // 预先创建titleLabel
44 | UILabel *titleLabel = [[UILabel alloc] init];
45 | titleLabel.textColor = JYJColor(51, 51, 51);
46 | titleLabel.font = [UIFont systemFontOfSize:14];
47 | [self.contentView addSubview:titleLabel];
48 | self.titleLabel = titleLabel;
49 |
50 | UIView *topView = [[UIView alloc] init];
51 | topView.backgroundColor = [UIColor blackColor];
52 | [self.contentView addSubview:topView];
53 | self.topView = topView;
54 | self.topView.hidden = YES;
55 |
56 | UIView *leftView = [[UIView alloc] init];
57 | leftView.backgroundColor = [UIColor blackColor];
58 | [self.contentView addSubview:leftView];
59 | self.leftView = leftView;
60 | self.leftView.hidden = YES;
61 |
62 | UIView *bottomView = [[UIView alloc] init];
63 | bottomView.backgroundColor = [UIColor blackColor];
64 | [self.contentView addSubview:bottomView];
65 | self.bottomView = bottomView;
66 | self.bottomView.hidden = YES;
67 |
68 | UIView *rigthView = [[UIView alloc] init];
69 | rigthView.backgroundColor = [UIColor blackColor];
70 | [self.contentView addSubview:rigthView];
71 | self.rigthView = rigthView;
72 | self.rigthView.hidden = YES;
73 | }
74 |
75 | - (void)layoutSubviews {
76 | [super layoutSubviews];
77 |
78 | CGFloat titleLabelX = 10;
79 | CGFloat titleLabelY = 0;
80 | CGFloat titleLabelW = self.width - 2 * titleLabelX ;
81 | CGFloat titleLabelH = self.height;
82 | self.titleLabel.frame = CGRectMake(titleLabelX, titleLabelY, titleLabelW, titleLabelH);
83 |
84 | CGFloat topViewX = 0.5;
85 | CGFloat topViewY = 0.5;
86 | CGFloat topViewW = self.width - 2 * topViewX;
87 | CGFloat topViewH = 0.5;
88 | self.topView.frame = CGRectMake(topViewX, topViewY, topViewW, topViewH);
89 |
90 | CGFloat leftViewX = 0.5;
91 | CGFloat leftViewY = 0.5;
92 | CGFloat leftViewW = 0.5;
93 | CGFloat leftViewH = self.height - 2 * leftViewX;
94 | self.leftView.frame = CGRectMake(leftViewX, leftViewY, leftViewW, leftViewH);
95 |
96 | CGFloat bottomViewX = 0.5;
97 | CGFloat bottomViewH = 0.5;
98 | CGFloat bottomViewY = self.height - 1;
99 | CGFloat bottomViewW = self.width - 2 * bottomViewX;
100 | self.bottomView.frame = CGRectMake(bottomViewX, bottomViewY, bottomViewW, bottomViewH);
101 |
102 | CGFloat rigthViewX = self.width - 1;
103 | CGFloat rigthViewY = 0.5;
104 | CGFloat rigthViewW = 0.5;
105 | CGFloat rigthViewH = leftViewH;
106 | self.rigthView.frame = CGRectMake(rigthViewX, rigthViewY, rigthViewW, rigthViewH);
107 | }
108 |
109 | - (void)setDataFunction:(NSIndexPath *)path andTotalPath:(NSIndexPath *)TotalPath andTitle:(NSString *)title{
110 |
111 | self.titleLabel.hidden = NO;
112 | self.titleLabel.text = title;
113 | [self HiddenAllSpaceViewFunction];
114 | [self ViewIsHiddenAndShowFuntion:path andTotalPath:TotalPath];
115 |
116 | }
117 | - (void)HiddenAllSpaceViewFunction{
118 | self.topView.hidden = YES;
119 | self.bottomView.hidden = YES;
120 | self.rigthView.hidden = YES;
121 | self.leftView.hidden = YES;
122 | }
123 |
124 | - (void)ViewIsHiddenAndShowFuntion:(NSIndexPath *)path andTotalPath:(NSIndexPath *)TotalPath{
125 | NSInteger DQSection = 0;
126 | NSInteger DQRow = 0;
127 | if (TotalPath.section>=0) {//防止为负数
128 | DQSection = TotalPath.section;
129 | }
130 |
131 | if (TotalPath.row>=0) {
132 | DQRow = TotalPath.row;
133 | }
134 |
135 | if (DQSection == 0) { //只有一组
136 | self.leftView.hidden = NO;
137 | self.rigthView.hidden = NO;
138 | [self fristShowleftViewAndLastShowRightView:path andTatolPath:TotalPath];
139 | } else {//两组或者两组以上
140 | if (path.section == 0) {//第一组
141 | self.leftView.hidden = NO;
142 |
143 | [self fristShowleftViewAndLastShowRightView:path andTatolPath:TotalPath];
144 |
145 | } else if (path.section >= DQSection) {//最后一组
146 | self.rigthView.hidden = NO;
147 | [self fristShowleftViewAndLastShowRightView:path andTatolPath:TotalPath];
148 | } else {//中间的
149 | [self fristShowleftViewAndLastShowRightView:path andTatolPath:TotalPath];
150 | }
151 | }
152 | }
153 | - (void)fristShowleftViewAndLastShowRightView:(NSIndexPath *)path andTatolPath:(NSIndexPath *)TotalPath{
154 | NSInteger DQRow = 0;
155 | if (TotalPath.row>=0) {//防止为负数
156 | DQRow = TotalPath.row;
157 | }
158 | if (path.row == 0) {
159 | self.topView.hidden = NO;
160 | }
161 | if (path.row >= DQRow) {
162 | self.bottomView.hidden = NO;
163 | }
164 |
165 | }
166 |
167 | @end
168 |
--------------------------------------------------------------------------------
/JYJForm/JYJForm.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | E20570DC1E34963D00F331D6 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = E20570DB1E34963D00F331D6 /* main.m */; };
11 | E20570DF1E34963D00F331D6 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = E20570DE1E34963D00F331D6 /* AppDelegate.m */; };
12 | E20570E21E34963D00F331D6 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E20570E11E34963D00F331D6 /* ViewController.m */; };
13 | E20570E51E34963D00F331D6 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E20570E31E34963D00F331D6 /* Main.storyboard */; };
14 | E20570E71E34963D00F331D6 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E20570E61E34963D00F331D6 /* Assets.xcassets */; };
15 | E20570EA1E34963D00F331D6 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E20570E81E34963D00F331D6 /* LaunchScreen.storyboard */; };
16 | E20570F81E3496C600F331D6 /* JYJTableCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E20570F31E3496C600F331D6 /* JYJTableCell.m */; };
17 | E20570F91E3496C600F331D6 /* JYJCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E20570F51E3496C600F331D6 /* JYJCollectionViewCell.m */; };
18 | E20570FA1E3496C600F331D6 /* JYJWaterFlowLayout.m in Sources */ = {isa = PBXBuildFile; fileRef = E20570F71E3496C600F331D6 /* JYJWaterFlowLayout.m */; };
19 | E20570FD1E3497F600F331D6 /* JYJConst.m in Sources */ = {isa = PBXBuildFile; fileRef = E20570FC1E3497F600F331D6 /* JYJConst.m */; };
20 | E20571001E3498D300F331D6 /* UIView+Extension.m in Sources */ = {isa = PBXBuildFile; fileRef = E20570FF1E3498D300F331D6 /* UIView+Extension.m */; };
21 | /* End PBXBuildFile section */
22 |
23 | /* Begin PBXFileReference section */
24 | E20570D71E34963D00F331D6 /* JYJForm.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = JYJForm.app; sourceTree = BUILT_PRODUCTS_DIR; };
25 | E20570DB1E34963D00F331D6 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
26 | E20570DD1E34963D00F331D6 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
27 | E20570DE1E34963D00F331D6 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
28 | E20570E01E34963D00F331D6 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; };
29 | E20570E11E34963D00F331D6 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; };
30 | E20570E41E34963D00F331D6 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
31 | E20570E61E34963D00F331D6 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
32 | E20570E91E34963D00F331D6 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
33 | E20570EB1E34963D00F331D6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
34 | E20570F21E3496C600F331D6 /* JYJTableCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JYJTableCell.h; sourceTree = ""; };
35 | E20570F31E3496C600F331D6 /* JYJTableCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JYJTableCell.m; sourceTree = ""; };
36 | E20570F41E3496C600F331D6 /* JYJCollectionViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JYJCollectionViewCell.h; sourceTree = ""; };
37 | E20570F51E3496C600F331D6 /* JYJCollectionViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JYJCollectionViewCell.m; sourceTree = ""; };
38 | E20570F61E3496C600F331D6 /* JYJWaterFlowLayout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JYJWaterFlowLayout.h; sourceTree = ""; };
39 | E20570F71E3496C600F331D6 /* JYJWaterFlowLayout.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JYJWaterFlowLayout.m; sourceTree = ""; };
40 | E20570FB1E3497F600F331D6 /* JYJConst.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JYJConst.h; sourceTree = ""; };
41 | E20570FC1E3497F600F331D6 /* JYJConst.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JYJConst.m; sourceTree = ""; };
42 | E20570FE1E3498D300F331D6 /* UIView+Extension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+Extension.h"; sourceTree = ""; };
43 | E20570FF1E3498D300F331D6 /* UIView+Extension.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+Extension.m"; sourceTree = ""; };
44 | /* End PBXFileReference section */
45 |
46 | /* Begin PBXFrameworksBuildPhase section */
47 | E20570D41E34963D00F331D6 /* Frameworks */ = {
48 | isa = PBXFrameworksBuildPhase;
49 | buildActionMask = 2147483647;
50 | files = (
51 | );
52 | runOnlyForDeploymentPostprocessing = 0;
53 | };
54 | /* End PBXFrameworksBuildPhase section */
55 |
56 | /* Begin PBXGroup section */
57 | E20570CE1E34963D00F331D6 = {
58 | isa = PBXGroup;
59 | children = (
60 | E20570D91E34963D00F331D6 /* JYJForm */,
61 | E20570D81E34963D00F331D6 /* Products */,
62 | );
63 | sourceTree = "";
64 | };
65 | E20570D81E34963D00F331D6 /* Products */ = {
66 | isa = PBXGroup;
67 | children = (
68 | E20570D71E34963D00F331D6 /* JYJForm.app */,
69 | );
70 | name = Products;
71 | sourceTree = "";
72 | };
73 | E20570D91E34963D00F331D6 /* JYJForm */ = {
74 | isa = PBXGroup;
75 | children = (
76 | E20570FE1E3498D300F331D6 /* UIView+Extension.h */,
77 | E20570FF1E3498D300F331D6 /* UIView+Extension.m */,
78 | E20570FB1E3497F600F331D6 /* JYJConst.h */,
79 | E20570FC1E3497F600F331D6 /* JYJConst.m */,
80 | E20570F11E3496AD00F331D6 /* JYJForm */,
81 | E20570DD1E34963D00F331D6 /* AppDelegate.h */,
82 | E20570DE1E34963D00F331D6 /* AppDelegate.m */,
83 | E20570E01E34963D00F331D6 /* ViewController.h */,
84 | E20570E11E34963D00F331D6 /* ViewController.m */,
85 | E20570E31E34963D00F331D6 /* Main.storyboard */,
86 | E20570E61E34963D00F331D6 /* Assets.xcassets */,
87 | E20570E81E34963D00F331D6 /* LaunchScreen.storyboard */,
88 | E20570EB1E34963D00F331D6 /* Info.plist */,
89 | E20570DA1E34963D00F331D6 /* Supporting Files */,
90 | );
91 | path = JYJForm;
92 | sourceTree = "";
93 | };
94 | E20570DA1E34963D00F331D6 /* Supporting Files */ = {
95 | isa = PBXGroup;
96 | children = (
97 | E20570DB1E34963D00F331D6 /* main.m */,
98 | );
99 | name = "Supporting Files";
100 | sourceTree = "";
101 | };
102 | E20570F11E3496AD00F331D6 /* JYJForm */ = {
103 | isa = PBXGroup;
104 | children = (
105 | E20570F21E3496C600F331D6 /* JYJTableCell.h */,
106 | E20570F31E3496C600F331D6 /* JYJTableCell.m */,
107 | E20570F41E3496C600F331D6 /* JYJCollectionViewCell.h */,
108 | E20570F51E3496C600F331D6 /* JYJCollectionViewCell.m */,
109 | E20570F61E3496C600F331D6 /* JYJWaterFlowLayout.h */,
110 | E20570F71E3496C600F331D6 /* JYJWaterFlowLayout.m */,
111 | );
112 | path = JYJForm;
113 | sourceTree = "";
114 | };
115 | /* End PBXGroup section */
116 |
117 | /* Begin PBXNativeTarget section */
118 | E20570D61E34963D00F331D6 /* JYJForm */ = {
119 | isa = PBXNativeTarget;
120 | buildConfigurationList = E20570EE1E34963D00F331D6 /* Build configuration list for PBXNativeTarget "JYJForm" */;
121 | buildPhases = (
122 | E20570D31E34963D00F331D6 /* Sources */,
123 | E20570D41E34963D00F331D6 /* Frameworks */,
124 | E20570D51E34963D00F331D6 /* Resources */,
125 | );
126 | buildRules = (
127 | );
128 | dependencies = (
129 | );
130 | name = JYJForm;
131 | productName = JYJForm;
132 | productReference = E20570D71E34963D00F331D6 /* JYJForm.app */;
133 | productType = "com.apple.product-type.application";
134 | };
135 | /* End PBXNativeTarget section */
136 |
137 | /* Begin PBXProject section */
138 | E20570CF1E34963D00F331D6 /* Project object */ = {
139 | isa = PBXProject;
140 | attributes = {
141 | LastUpgradeCheck = 0820;
142 | ORGANIZATIONNAME = baobeikeji;
143 | TargetAttributes = {
144 | E20570D61E34963D00F331D6 = {
145 | CreatedOnToolsVersion = 8.2.1;
146 | DevelopmentTeam = 93J869YU7G;
147 | ProvisioningStyle = Automatic;
148 | };
149 | };
150 | };
151 | buildConfigurationList = E20570D21E34963D00F331D6 /* Build configuration list for PBXProject "JYJForm" */;
152 | compatibilityVersion = "Xcode 3.2";
153 | developmentRegion = English;
154 | hasScannedForEncodings = 0;
155 | knownRegions = (
156 | en,
157 | Base,
158 | );
159 | mainGroup = E20570CE1E34963D00F331D6;
160 | productRefGroup = E20570D81E34963D00F331D6 /* Products */;
161 | projectDirPath = "";
162 | projectRoot = "";
163 | targets = (
164 | E20570D61E34963D00F331D6 /* JYJForm */,
165 | );
166 | };
167 | /* End PBXProject section */
168 |
169 | /* Begin PBXResourcesBuildPhase section */
170 | E20570D51E34963D00F331D6 /* Resources */ = {
171 | isa = PBXResourcesBuildPhase;
172 | buildActionMask = 2147483647;
173 | files = (
174 | E20570EA1E34963D00F331D6 /* LaunchScreen.storyboard in Resources */,
175 | E20570E71E34963D00F331D6 /* Assets.xcassets in Resources */,
176 | E20570E51E34963D00F331D6 /* Main.storyboard in Resources */,
177 | );
178 | runOnlyForDeploymentPostprocessing = 0;
179 | };
180 | /* End PBXResourcesBuildPhase section */
181 |
182 | /* Begin PBXSourcesBuildPhase section */
183 | E20570D31E34963D00F331D6 /* Sources */ = {
184 | isa = PBXSourcesBuildPhase;
185 | buildActionMask = 2147483647;
186 | files = (
187 | E20570E21E34963D00F331D6 /* ViewController.m in Sources */,
188 | E20570FA1E3496C600F331D6 /* JYJWaterFlowLayout.m in Sources */,
189 | E20570DF1E34963D00F331D6 /* AppDelegate.m in Sources */,
190 | E20570DC1E34963D00F331D6 /* main.m in Sources */,
191 | E20570FD1E3497F600F331D6 /* JYJConst.m in Sources */,
192 | E20570F81E3496C600F331D6 /* JYJTableCell.m in Sources */,
193 | E20571001E3498D300F331D6 /* UIView+Extension.m in Sources */,
194 | E20570F91E3496C600F331D6 /* JYJCollectionViewCell.m in Sources */,
195 | );
196 | runOnlyForDeploymentPostprocessing = 0;
197 | };
198 | /* End PBXSourcesBuildPhase section */
199 |
200 | /* Begin PBXVariantGroup section */
201 | E20570E31E34963D00F331D6 /* Main.storyboard */ = {
202 | isa = PBXVariantGroup;
203 | children = (
204 | E20570E41E34963D00F331D6 /* Base */,
205 | );
206 | name = Main.storyboard;
207 | sourceTree = "";
208 | };
209 | E20570E81E34963D00F331D6 /* LaunchScreen.storyboard */ = {
210 | isa = PBXVariantGroup;
211 | children = (
212 | E20570E91E34963D00F331D6 /* Base */,
213 | );
214 | name = LaunchScreen.storyboard;
215 | sourceTree = "";
216 | };
217 | /* End PBXVariantGroup section */
218 |
219 | /* Begin XCBuildConfiguration section */
220 | E20570EC1E34963D00F331D6 /* Debug */ = {
221 | isa = XCBuildConfiguration;
222 | buildSettings = {
223 | ALWAYS_SEARCH_USER_PATHS = NO;
224 | CLANG_ANALYZER_NONNULL = YES;
225 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
226 | CLANG_CXX_LIBRARY = "libc++";
227 | CLANG_ENABLE_MODULES = YES;
228 | CLANG_ENABLE_OBJC_ARC = YES;
229 | CLANG_WARN_BOOL_CONVERSION = YES;
230 | CLANG_WARN_CONSTANT_CONVERSION = YES;
231 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
232 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
233 | CLANG_WARN_EMPTY_BODY = YES;
234 | CLANG_WARN_ENUM_CONVERSION = YES;
235 | CLANG_WARN_INFINITE_RECURSION = YES;
236 | CLANG_WARN_INT_CONVERSION = YES;
237 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
238 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
239 | CLANG_WARN_UNREACHABLE_CODE = YES;
240 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
241 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
242 | COPY_PHASE_STRIP = NO;
243 | DEBUG_INFORMATION_FORMAT = dwarf;
244 | ENABLE_STRICT_OBJC_MSGSEND = YES;
245 | ENABLE_TESTABILITY = YES;
246 | GCC_C_LANGUAGE_STANDARD = gnu99;
247 | GCC_DYNAMIC_NO_PIC = NO;
248 | GCC_NO_COMMON_BLOCKS = YES;
249 | GCC_OPTIMIZATION_LEVEL = 0;
250 | GCC_PREPROCESSOR_DEFINITIONS = (
251 | "DEBUG=1",
252 | "$(inherited)",
253 | );
254 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
255 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
256 | GCC_WARN_UNDECLARED_SELECTOR = YES;
257 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
258 | GCC_WARN_UNUSED_FUNCTION = YES;
259 | GCC_WARN_UNUSED_VARIABLE = YES;
260 | IPHONEOS_DEPLOYMENT_TARGET = 10.2;
261 | MTL_ENABLE_DEBUG_INFO = YES;
262 | ONLY_ACTIVE_ARCH = YES;
263 | SDKROOT = iphoneos;
264 | };
265 | name = Debug;
266 | };
267 | E20570ED1E34963D00F331D6 /* Release */ = {
268 | isa = XCBuildConfiguration;
269 | buildSettings = {
270 | ALWAYS_SEARCH_USER_PATHS = NO;
271 | CLANG_ANALYZER_NONNULL = YES;
272 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
273 | CLANG_CXX_LIBRARY = "libc++";
274 | CLANG_ENABLE_MODULES = YES;
275 | CLANG_ENABLE_OBJC_ARC = YES;
276 | CLANG_WARN_BOOL_CONVERSION = YES;
277 | CLANG_WARN_CONSTANT_CONVERSION = YES;
278 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
279 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
280 | CLANG_WARN_EMPTY_BODY = YES;
281 | CLANG_WARN_ENUM_CONVERSION = YES;
282 | CLANG_WARN_INFINITE_RECURSION = YES;
283 | CLANG_WARN_INT_CONVERSION = YES;
284 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
285 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
286 | CLANG_WARN_UNREACHABLE_CODE = YES;
287 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
288 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
289 | COPY_PHASE_STRIP = NO;
290 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
291 | ENABLE_NS_ASSERTIONS = NO;
292 | ENABLE_STRICT_OBJC_MSGSEND = YES;
293 | GCC_C_LANGUAGE_STANDARD = gnu99;
294 | GCC_NO_COMMON_BLOCKS = YES;
295 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
296 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
297 | GCC_WARN_UNDECLARED_SELECTOR = YES;
298 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
299 | GCC_WARN_UNUSED_FUNCTION = YES;
300 | GCC_WARN_UNUSED_VARIABLE = YES;
301 | IPHONEOS_DEPLOYMENT_TARGET = 10.2;
302 | MTL_ENABLE_DEBUG_INFO = NO;
303 | SDKROOT = iphoneos;
304 | VALIDATE_PRODUCT = YES;
305 | };
306 | name = Release;
307 | };
308 | E20570EF1E34963D00F331D6 /* Debug */ = {
309 | isa = XCBuildConfiguration;
310 | buildSettings = {
311 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
312 | DEVELOPMENT_TEAM = 93J869YU7G;
313 | INFOPLIST_FILE = JYJForm/Info.plist;
314 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
315 | PRODUCT_BUNDLE_IDENTIFIER = cn.baobeikeji.JYJForm;
316 | PRODUCT_NAME = "$(TARGET_NAME)";
317 | };
318 | name = Debug;
319 | };
320 | E20570F01E34963D00F331D6 /* Release */ = {
321 | isa = XCBuildConfiguration;
322 | buildSettings = {
323 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
324 | DEVELOPMENT_TEAM = 93J869YU7G;
325 | INFOPLIST_FILE = JYJForm/Info.plist;
326 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
327 | PRODUCT_BUNDLE_IDENTIFIER = cn.baobeikeji.JYJForm;
328 | PRODUCT_NAME = "$(TARGET_NAME)";
329 | };
330 | name = Release;
331 | };
332 | /* End XCBuildConfiguration section */
333 |
334 | /* Begin XCConfigurationList section */
335 | E20570D21E34963D00F331D6 /* Build configuration list for PBXProject "JYJForm" */ = {
336 | isa = XCConfigurationList;
337 | buildConfigurations = (
338 | E20570EC1E34963D00F331D6 /* Debug */,
339 | E20570ED1E34963D00F331D6 /* Release */,
340 | );
341 | defaultConfigurationIsVisible = 0;
342 | defaultConfigurationName = Release;
343 | };
344 | E20570EE1E34963D00F331D6 /* Build configuration list for PBXNativeTarget "JYJForm" */ = {
345 | isa = XCConfigurationList;
346 | buildConfigurations = (
347 | E20570EF1E34963D00F331D6 /* Debug */,
348 | E20570F01E34963D00F331D6 /* Release */,
349 | );
350 | defaultConfigurationIsVisible = 0;
351 | defaultConfigurationName = Release;
352 | };
353 | /* End XCConfigurationList section */
354 | };
355 | rootObject = E20570CF1E34963D00F331D6 /* Project object */;
356 | }
357 |
--------------------------------------------------------------------------------