├── README.md
├── DynamicHeightCollectionView
├── Assets.xcassets
│ ├── Contents.json
│ └── AppIcon.appiconset
│ │ └── Contents.json
├── Example
│ ├── DynamicHeightCollectionView.swift
│ ├── CollectionViewCell.swift
│ ├── ViewController.swift
│ ├── TableViewCell.swift
│ └── CollectionViewFlowLayout.swift
├── Info.plist
├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
└── AppDelegate.swift
└── DynamicHeightCollectionView.xcodeproj
├── project.xcworkspace
├── contents.xcworkspacedata
├── xcuserdata
│ └── payalgupta.xcuserdatad
│ │ └── UserInterfaceState.xcuserstate
└── xcshareddata
│ └── IDEWorkspaceChecks.plist
├── xcuserdata
└── payalgupta.xcuserdatad
│ └── xcschemes
│ └── xcschememanagement.plist
└── project.pbxproj
/README.md:
--------------------------------------------------------------------------------
1 | # DynamicHeightCollectionView
2 | Dynamic Height Collection View
3 |
--------------------------------------------------------------------------------
/DynamicHeightCollectionView/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/DynamicHeightCollectionView.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/DynamicHeightCollectionView.xcodeproj/project.xcworkspace/xcuserdata/payalgupta.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pgpt10/DynamicHeightCollectionView/HEAD/DynamicHeightCollectionView.xcodeproj/project.xcworkspace/xcuserdata/payalgupta.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/DynamicHeightCollectionView.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/DynamicHeightCollectionView.xcodeproj/xcuserdata/payalgupta.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | DynamicHeightCollectionView.xcscheme_^#shared#^_
8 |
9 | orderHint
10 | 0
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/DynamicHeightCollectionView/Example/DynamicHeightCollectionView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // DynamicHeightCollectionView.swift
3 | // DynamicHeightCollectionView
4 | //
5 | // Created by Payal Gupta on 11/02/19.
6 | // Copyright © 2019 Payal Gupta. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class DynamicHeightCollectionView: UICollectionView {
12 | override func layoutSubviews() {
13 | super.layoutSubviews()
14 | if !__CGSizeEqualToSize(bounds.size, self.intrinsicContentSize) {
15 | self.invalidateIntrinsicContentSize()
16 | }
17 | }
18 |
19 | override var intrinsicContentSize: CGSize {
20 | return contentSize
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/DynamicHeightCollectionView/Example/CollectionViewCell.swift:
--------------------------------------------------------------------------------
1 | //
2 | // CollectionViewCell.swift
3 | // DynamicHeightCollectionView
4 | //
5 | // Created by Payal Gupta on 11/02/19.
6 | // Copyright © 2019 Payal Gupta. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class CollectionViewCell: UICollectionViewCell {
12 | @IBOutlet weak var textLabel: UILabel!
13 |
14 | override func awakeFromNib() {
15 | super.awakeFromNib()
16 | self.textLabel.text = nil
17 | self.layer.cornerRadius = 3.0
18 | self.layer.borderWidth = 1.0
19 | self.layer.borderColor = #colorLiteral(red: 0.2392156869, green: 0.6745098233, blue: 0.9686274529, alpha: 1).cgColor
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/DynamicHeightCollectionView/Example/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // DynamicHeightCollectionView
4 | //
5 | // Created by Payal Gupta on 08/02/19.
6 | // Copyright © 2019 Payal Gupta. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 | @IBOutlet weak var tableView: UITableView!
13 |
14 | var arr = ["Basic Operators", "Strings and Characters", "Collection Types", "Control Flow", "Structures and Classes", "Optional Chaining", "Closures", "Automatic Reference Counting", "Advanced Operators", "Access Control", "Memory Safety", "Generics", "Protocols", "Extensions", "Type Casting", "Nested Types", "Error Handling", "Deinitialization"]
15 |
16 | override func viewDidLoad() {
17 | super.viewDidLoad()
18 | }
19 | }
20 |
21 | extension ViewController: UITableViewDataSource, UITableViewDelegate {
22 | func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
23 | return 1
24 | }
25 |
26 | func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
27 | let cell = tableView.dequeueReusableCell(withIdentifier: "TableViewCell", for: indexPath) as! TableViewCell
28 | cell.configure(with: self.arr)
29 | return cell
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/DynamicHeightCollectionView/Example/TableViewCell.swift:
--------------------------------------------------------------------------------
1 | //
2 | // TableViewCell.swift
3 | // DynamicHeightCollectionView
4 | //
5 | // Created by Payal Gupta on 11/02/19.
6 | // Copyright © 2019 Payal Gupta. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class TableViewCell: UITableViewCell {
12 | @IBOutlet weak var collectionView: UICollectionView!
13 | var arr = [String]()
14 |
15 | func configure(with arr: [String]) {
16 | self.arr = arr
17 | self.collectionView.reloadData()
18 | self.collectionView.layoutIfNeeded()
19 | }
20 | }
21 |
22 | extension TableViewCell: UICollectionViewDataSource, UICollectionViewDelegateFlowLayout {
23 | func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
24 | return self.arr.count
25 | }
26 |
27 | func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
28 | let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "CollectionViewCell", for: indexPath) as! CollectionViewCell
29 | cell.textLabel.text = self.arr[indexPath.row]
30 | return cell
31 | }
32 |
33 | func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
34 | let text = self.arr[indexPath.row]
35 | let cellWidth = text.size(withAttributes:[.font: UIFont.systemFont(ofSize:12.0)]).width + 30.0
36 | return CGSize(width: cellWidth, height: 30.0)
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/DynamicHeightCollectionView/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
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 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/DynamicHeightCollectionView/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 |
--------------------------------------------------------------------------------
/DynamicHeightCollectionView/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "20x20",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "20x20",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "29x29",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "29x29",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "40x40",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "40x40",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "iphone",
35 | "size" : "60x60",
36 | "scale" : "2x"
37 | },
38 | {
39 | "idiom" : "iphone",
40 | "size" : "60x60",
41 | "scale" : "3x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "20x20",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "20x20",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "29x29",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "29x29",
61 | "scale" : "2x"
62 | },
63 | {
64 | "idiom" : "ipad",
65 | "size" : "40x40",
66 | "scale" : "1x"
67 | },
68 | {
69 | "idiom" : "ipad",
70 | "size" : "40x40",
71 | "scale" : "2x"
72 | },
73 | {
74 | "idiom" : "ipad",
75 | "size" : "76x76",
76 | "scale" : "1x"
77 | },
78 | {
79 | "idiom" : "ipad",
80 | "size" : "76x76",
81 | "scale" : "2x"
82 | },
83 | {
84 | "idiom" : "ipad",
85 | "size" : "83.5x83.5",
86 | "scale" : "2x"
87 | },
88 | {
89 | "idiom" : "ios-marketing",
90 | "size" : "1024x1024",
91 | "scale" : "1x"
92 | }
93 | ],
94 | "info" : {
95 | "version" : 1,
96 | "author" : "xcode"
97 | }
98 | }
--------------------------------------------------------------------------------
/DynamicHeightCollectionView/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // DynamicHeightCollectionView
4 | //
5 | // Created by Payal Gupta on 08/02/19.
6 | // Copyright © 2019 Payal Gupta. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | @UIApplicationMain
12 | class AppDelegate: UIResponder, UIApplicationDelegate {
13 |
14 | var window: UIWindow?
15 |
16 |
17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
18 | // Override point for customization after application launch.
19 | return true
20 | }
21 |
22 | func applicationWillResignActive(_ application: UIApplication) {
23 | // 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.
24 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
25 | }
26 |
27 | func applicationDidEnterBackground(_ application: UIApplication) {
28 | // 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.
29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
30 | }
31 |
32 | func applicationWillEnterForeground(_ application: UIApplication) {
33 | // 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.
34 | }
35 |
36 | func applicationDidBecomeActive(_ application: UIApplication) {
37 | // 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.
38 | }
39 |
40 | func applicationWillTerminate(_ application: UIApplication) {
41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
42 | }
43 |
44 |
45 | }
46 |
47 |
--------------------------------------------------------------------------------
/DynamicHeightCollectionView/Example/CollectionViewFlowLayout.swift:
--------------------------------------------------------------------------------
1 | //
2 | // CollectionViewFlowLayout.swift
3 | // DynamicHeightCollectionView
4 | //
5 | // Created by Payal Gupta on 11/02/19.
6 | // Copyright © 2019 Payal Gupta. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class CollectionViewFlowLayout: UICollectionViewFlowLayout {
12 | var tempCellAttributesArray = [UICollectionViewLayoutAttributes]()
13 | let leftEdgeInset: CGFloat = 10
14 |
15 | override func layoutAttributesForElements(in rect: CGRect) -> [UICollectionViewLayoutAttributes]? {
16 | let cellAttributesArray = super.layoutAttributesForElements(in: rect)
17 | //Oth position cellAttr is InConvience Emoji Cell, from 1st onwards info cells are there, thats why we start count from 2nd position.
18 | if(cellAttributesArray != nil && cellAttributesArray!.count > 1) {
19 | for i in 1..<(cellAttributesArray!.count) {
20 | let prevLayoutAttributes: UICollectionViewLayoutAttributes = cellAttributesArray![i - 1]
21 | let currentLayoutAttributes: UICollectionViewLayoutAttributes = cellAttributesArray![i]
22 | let maximumSpacing: CGFloat = 8
23 | let prevCellMaxX: CGFloat = prevLayoutAttributes.frame.maxX
24 | //UIEdgeInset 30 from left
25 | let collectionViewSectionWidth = self.collectionViewContentSize.width - leftEdgeInset
26 | let currentCellExpectedMaxX = prevCellMaxX + maximumSpacing + (currentLayoutAttributes.frame.size.width )
27 | if currentCellExpectedMaxX < collectionViewSectionWidth {
28 | var frame: CGRect? = currentLayoutAttributes.frame
29 | frame?.origin.x = prevCellMaxX + maximumSpacing
30 | frame?.origin.y = prevLayoutAttributes.frame.origin.y
31 | currentLayoutAttributes.frame = frame ?? CGRect.zero
32 | } else {
33 | // self.shiftCellsToCenter()
34 | currentLayoutAttributes.frame.origin.x = leftEdgeInset
35 | //To Avoid InConvience Emoji Cell
36 | if (prevLayoutAttributes.frame.origin.x != 0) {
37 | currentLayoutAttributes.frame.origin.y = prevLayoutAttributes.frame.origin.y + prevLayoutAttributes.frame.size.height + 08
38 | }
39 | }
40 | // print(currentLayoutAttributes.frame)
41 | }
42 | //print("Main For Loop End")
43 | }
44 | // self.shiftCellsToCenter()
45 | return cellAttributesArray
46 | }
47 |
48 | func shiftCellsToCenter() {
49 | if (tempCellAttributesArray.count == 0) {return}
50 | let lastCellLayoutAttributes = self.tempCellAttributesArray[self.tempCellAttributesArray.count-1]
51 | let lastCellMaxX: CGFloat = lastCellLayoutAttributes.frame.maxX
52 | let collectionViewSectionWidth = self.collectionViewContentSize.width - leftEdgeInset
53 | let xAxisDifference = collectionViewSectionWidth - lastCellMaxX
54 | if xAxisDifference > 0 {
55 | for each in self.tempCellAttributesArray{
56 | each.frame.origin.x += xAxisDifference/2
57 | }
58 | }
59 |
60 | }
61 | }
62 |
63 |
--------------------------------------------------------------------------------
/DynamicHeightCollectionView/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 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
--------------------------------------------------------------------------------
/DynamicHeightCollectionView.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 50;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | BD85B93D220DC08B00D33BF9 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD85B93C220DC08B00D33BF9 /* AppDelegate.swift */; };
11 | BD85B93F220DC08B00D33BF9 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD85B93E220DC08B00D33BF9 /* ViewController.swift */; };
12 | BD85B942220DC08B00D33BF9 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BD85B940220DC08B00D33BF9 /* Main.storyboard */; };
13 | BD85B944220DC08F00D33BF9 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = BD85B943220DC08F00D33BF9 /* Assets.xcassets */; };
14 | BD85B947220DC08F00D33BF9 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BD85B945220DC08F00D33BF9 /* LaunchScreen.storyboard */; };
15 | BDACC1022211839500B0ABEB /* TableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDACC1012211839500B0ABEB /* TableViewCell.swift */; };
16 | BDACC104221183BE00B0ABEB /* CollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDACC103221183BE00B0ABEB /* CollectionViewCell.swift */; };
17 | BDACC106221183F500B0ABEB /* DynamicHeightCollectionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDACC105221183F500B0ABEB /* DynamicHeightCollectionView.swift */; };
18 | BDACC1082211841B00B0ABEB /* CollectionViewFlowLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDACC1072211841B00B0ABEB /* CollectionViewFlowLayout.swift */; };
19 | /* End PBXBuildFile section */
20 |
21 | /* Begin PBXFileReference section */
22 | BD85B939220DC08B00D33BF9 /* DynamicHeightCollectionView.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DynamicHeightCollectionView.app; sourceTree = BUILT_PRODUCTS_DIR; };
23 | BD85B93C220DC08B00D33BF9 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
24 | BD85B93E220DC08B00D33BF9 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; };
25 | BD85B941220DC08B00D33BF9 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
26 | BD85B943220DC08F00D33BF9 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
27 | BD85B946220DC08F00D33BF9 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
28 | BD85B948220DC08F00D33BF9 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
29 | BDACC1012211839500B0ABEB /* TableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TableViewCell.swift; sourceTree = ""; };
30 | BDACC103221183BE00B0ABEB /* CollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CollectionViewCell.swift; sourceTree = ""; };
31 | BDACC105221183F500B0ABEB /* DynamicHeightCollectionView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DynamicHeightCollectionView.swift; sourceTree = ""; };
32 | BDACC1072211841B00B0ABEB /* CollectionViewFlowLayout.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CollectionViewFlowLayout.swift; sourceTree = ""; };
33 | /* End PBXFileReference section */
34 |
35 | /* Begin PBXFrameworksBuildPhase section */
36 | BD85B936220DC08B00D33BF9 /* Frameworks */ = {
37 | isa = PBXFrameworksBuildPhase;
38 | buildActionMask = 2147483647;
39 | files = (
40 | );
41 | runOnlyForDeploymentPostprocessing = 0;
42 | };
43 | /* End PBXFrameworksBuildPhase section */
44 |
45 | /* Begin PBXGroup section */
46 | BD85B930220DC08B00D33BF9 = {
47 | isa = PBXGroup;
48 | children = (
49 | BD85B93B220DC08B00D33BF9 /* DynamicHeightCollectionView */,
50 | BD85B93A220DC08B00D33BF9 /* Products */,
51 | );
52 | sourceTree = "";
53 | };
54 | BD85B93A220DC08B00D33BF9 /* Products */ = {
55 | isa = PBXGroup;
56 | children = (
57 | BD85B939220DC08B00D33BF9 /* DynamicHeightCollectionView.app */,
58 | );
59 | name = Products;
60 | sourceTree = "";
61 | };
62 | BD85B93B220DC08B00D33BF9 /* DynamicHeightCollectionView */ = {
63 | isa = PBXGroup;
64 | children = (
65 | BDACC1092211844D00B0ABEB /* Example */,
66 | BD85B93C220DC08B00D33BF9 /* AppDelegate.swift */,
67 | BD85B940220DC08B00D33BF9 /* Main.storyboard */,
68 | BD85B943220DC08F00D33BF9 /* Assets.xcassets */,
69 | BD85B945220DC08F00D33BF9 /* LaunchScreen.storyboard */,
70 | BD85B948220DC08F00D33BF9 /* Info.plist */,
71 | );
72 | path = DynamicHeightCollectionView;
73 | sourceTree = "";
74 | };
75 | BDACC1092211844D00B0ABEB /* Example */ = {
76 | isa = PBXGroup;
77 | children = (
78 | BD85B93E220DC08B00D33BF9 /* ViewController.swift */,
79 | BDACC1012211839500B0ABEB /* TableViewCell.swift */,
80 | BDACC103221183BE00B0ABEB /* CollectionViewCell.swift */,
81 | BDACC105221183F500B0ABEB /* DynamicHeightCollectionView.swift */,
82 | BDACC1072211841B00B0ABEB /* CollectionViewFlowLayout.swift */,
83 | );
84 | path = Example;
85 | sourceTree = "";
86 | };
87 | /* End PBXGroup section */
88 |
89 | /* Begin PBXNativeTarget section */
90 | BD85B938220DC08B00D33BF9 /* DynamicHeightCollectionView */ = {
91 | isa = PBXNativeTarget;
92 | buildConfigurationList = BD85B94B220DC08F00D33BF9 /* Build configuration list for PBXNativeTarget "DynamicHeightCollectionView" */;
93 | buildPhases = (
94 | BD85B935220DC08B00D33BF9 /* Sources */,
95 | BD85B936220DC08B00D33BF9 /* Frameworks */,
96 | BD85B937220DC08B00D33BF9 /* Resources */,
97 | );
98 | buildRules = (
99 | );
100 | dependencies = (
101 | );
102 | name = DynamicHeightCollectionView;
103 | productName = DynamicHeightCollectionView;
104 | productReference = BD85B939220DC08B00D33BF9 /* DynamicHeightCollectionView.app */;
105 | productType = "com.apple.product-type.application";
106 | };
107 | /* End PBXNativeTarget section */
108 |
109 | /* Begin PBXProject section */
110 | BD85B931220DC08B00D33BF9 /* Project object */ = {
111 | isa = PBXProject;
112 | attributes = {
113 | LastSwiftUpdateCheck = 1010;
114 | LastUpgradeCheck = 1010;
115 | ORGANIZATIONNAME = "Payal Gupta";
116 | TargetAttributes = {
117 | BD85B938220DC08B00D33BF9 = {
118 | CreatedOnToolsVersion = 10.1;
119 | };
120 | };
121 | };
122 | buildConfigurationList = BD85B934220DC08B00D33BF9 /* Build configuration list for PBXProject "DynamicHeightCollectionView" */;
123 | compatibilityVersion = "Xcode 9.3";
124 | developmentRegion = en;
125 | hasScannedForEncodings = 0;
126 | knownRegions = (
127 | en,
128 | Base,
129 | );
130 | mainGroup = BD85B930220DC08B00D33BF9;
131 | productRefGroup = BD85B93A220DC08B00D33BF9 /* Products */;
132 | projectDirPath = "";
133 | projectRoot = "";
134 | targets = (
135 | BD85B938220DC08B00D33BF9 /* DynamicHeightCollectionView */,
136 | );
137 | };
138 | /* End PBXProject section */
139 |
140 | /* Begin PBXResourcesBuildPhase section */
141 | BD85B937220DC08B00D33BF9 /* Resources */ = {
142 | isa = PBXResourcesBuildPhase;
143 | buildActionMask = 2147483647;
144 | files = (
145 | BD85B947220DC08F00D33BF9 /* LaunchScreen.storyboard in Resources */,
146 | BD85B944220DC08F00D33BF9 /* Assets.xcassets in Resources */,
147 | BD85B942220DC08B00D33BF9 /* Main.storyboard in Resources */,
148 | );
149 | runOnlyForDeploymentPostprocessing = 0;
150 | };
151 | /* End PBXResourcesBuildPhase section */
152 |
153 | /* Begin PBXSourcesBuildPhase section */
154 | BD85B935220DC08B00D33BF9 /* Sources */ = {
155 | isa = PBXSourcesBuildPhase;
156 | buildActionMask = 2147483647;
157 | files = (
158 | BDACC1082211841B00B0ABEB /* CollectionViewFlowLayout.swift in Sources */,
159 | BDACC1022211839500B0ABEB /* TableViewCell.swift in Sources */,
160 | BD85B93F220DC08B00D33BF9 /* ViewController.swift in Sources */,
161 | BDACC106221183F500B0ABEB /* DynamicHeightCollectionView.swift in Sources */,
162 | BDACC104221183BE00B0ABEB /* CollectionViewCell.swift in Sources */,
163 | BD85B93D220DC08B00D33BF9 /* AppDelegate.swift in Sources */,
164 | );
165 | runOnlyForDeploymentPostprocessing = 0;
166 | };
167 | /* End PBXSourcesBuildPhase section */
168 |
169 | /* Begin PBXVariantGroup section */
170 | BD85B940220DC08B00D33BF9 /* Main.storyboard */ = {
171 | isa = PBXVariantGroup;
172 | children = (
173 | BD85B941220DC08B00D33BF9 /* Base */,
174 | );
175 | name = Main.storyboard;
176 | sourceTree = "";
177 | };
178 | BD85B945220DC08F00D33BF9 /* LaunchScreen.storyboard */ = {
179 | isa = PBXVariantGroup;
180 | children = (
181 | BD85B946220DC08F00D33BF9 /* Base */,
182 | );
183 | name = LaunchScreen.storyboard;
184 | sourceTree = "";
185 | };
186 | /* End PBXVariantGroup section */
187 |
188 | /* Begin XCBuildConfiguration section */
189 | BD85B949220DC08F00D33BF9 /* Debug */ = {
190 | isa = XCBuildConfiguration;
191 | buildSettings = {
192 | ALWAYS_SEARCH_USER_PATHS = NO;
193 | CLANG_ANALYZER_NONNULL = YES;
194 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
195 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
196 | CLANG_CXX_LIBRARY = "libc++";
197 | CLANG_ENABLE_MODULES = YES;
198 | CLANG_ENABLE_OBJC_ARC = YES;
199 | CLANG_ENABLE_OBJC_WEAK = YES;
200 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
201 | CLANG_WARN_BOOL_CONVERSION = YES;
202 | CLANG_WARN_COMMA = YES;
203 | CLANG_WARN_CONSTANT_CONVERSION = YES;
204 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
205 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
206 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
207 | CLANG_WARN_EMPTY_BODY = YES;
208 | CLANG_WARN_ENUM_CONVERSION = YES;
209 | CLANG_WARN_INFINITE_RECURSION = YES;
210 | CLANG_WARN_INT_CONVERSION = YES;
211 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
212 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
213 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
214 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
215 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
216 | CLANG_WARN_STRICT_PROTOTYPES = YES;
217 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
218 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
219 | CLANG_WARN_UNREACHABLE_CODE = YES;
220 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
221 | CODE_SIGN_IDENTITY = "iPhone Developer";
222 | COPY_PHASE_STRIP = NO;
223 | DEBUG_INFORMATION_FORMAT = dwarf;
224 | ENABLE_STRICT_OBJC_MSGSEND = YES;
225 | ENABLE_TESTABILITY = YES;
226 | GCC_C_LANGUAGE_STANDARD = gnu11;
227 | GCC_DYNAMIC_NO_PIC = NO;
228 | GCC_NO_COMMON_BLOCKS = YES;
229 | GCC_OPTIMIZATION_LEVEL = 0;
230 | GCC_PREPROCESSOR_DEFINITIONS = (
231 | "DEBUG=1",
232 | "$(inherited)",
233 | );
234 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
235 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
236 | GCC_WARN_UNDECLARED_SELECTOR = YES;
237 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
238 | GCC_WARN_UNUSED_FUNCTION = YES;
239 | GCC_WARN_UNUSED_VARIABLE = YES;
240 | IPHONEOS_DEPLOYMENT_TARGET = 12.1;
241 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
242 | MTL_FAST_MATH = YES;
243 | ONLY_ACTIVE_ARCH = YES;
244 | SDKROOT = iphoneos;
245 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
246 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
247 | };
248 | name = Debug;
249 | };
250 | BD85B94A220DC08F00D33BF9 /* Release */ = {
251 | isa = XCBuildConfiguration;
252 | buildSettings = {
253 | ALWAYS_SEARCH_USER_PATHS = NO;
254 | CLANG_ANALYZER_NONNULL = YES;
255 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
256 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
257 | CLANG_CXX_LIBRARY = "libc++";
258 | CLANG_ENABLE_MODULES = YES;
259 | CLANG_ENABLE_OBJC_ARC = YES;
260 | CLANG_ENABLE_OBJC_WEAK = YES;
261 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
262 | CLANG_WARN_BOOL_CONVERSION = YES;
263 | CLANG_WARN_COMMA = YES;
264 | CLANG_WARN_CONSTANT_CONVERSION = YES;
265 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
266 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
267 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
268 | CLANG_WARN_EMPTY_BODY = YES;
269 | CLANG_WARN_ENUM_CONVERSION = YES;
270 | CLANG_WARN_INFINITE_RECURSION = YES;
271 | CLANG_WARN_INT_CONVERSION = YES;
272 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
273 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
274 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
275 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
276 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
277 | CLANG_WARN_STRICT_PROTOTYPES = YES;
278 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
279 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
280 | CLANG_WARN_UNREACHABLE_CODE = YES;
281 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
282 | CODE_SIGN_IDENTITY = "iPhone Developer";
283 | COPY_PHASE_STRIP = NO;
284 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
285 | ENABLE_NS_ASSERTIONS = NO;
286 | ENABLE_STRICT_OBJC_MSGSEND = YES;
287 | GCC_C_LANGUAGE_STANDARD = gnu11;
288 | GCC_NO_COMMON_BLOCKS = YES;
289 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
290 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
291 | GCC_WARN_UNDECLARED_SELECTOR = YES;
292 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
293 | GCC_WARN_UNUSED_FUNCTION = YES;
294 | GCC_WARN_UNUSED_VARIABLE = YES;
295 | IPHONEOS_DEPLOYMENT_TARGET = 12.1;
296 | MTL_ENABLE_DEBUG_INFO = NO;
297 | MTL_FAST_MATH = YES;
298 | SDKROOT = iphoneos;
299 | SWIFT_COMPILATION_MODE = wholemodule;
300 | SWIFT_OPTIMIZATION_LEVEL = "-O";
301 | VALIDATE_PRODUCT = YES;
302 | };
303 | name = Release;
304 | };
305 | BD85B94C220DC08F00D33BF9 /* Debug */ = {
306 | isa = XCBuildConfiguration;
307 | buildSettings = {
308 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
309 | CODE_SIGN_STYLE = Manual;
310 | DEVELOPMENT_TEAM = Z3QQ492P6Z;
311 | INFOPLIST_FILE = DynamicHeightCollectionView/Info.plist;
312 | LD_RUNPATH_SEARCH_PATHS = (
313 | "$(inherited)",
314 | "@executable_path/Frameworks",
315 | );
316 | PRODUCT_BUNDLE_IDENTIFIER = com.infoedge.DynamicHeightCollectionView;
317 | PRODUCT_NAME = "$(TARGET_NAME)";
318 | PROVISIONING_PROFILE_SPECIFIER = "99acres Generic";
319 | SWIFT_VERSION = 4.2;
320 | TARGETED_DEVICE_FAMILY = "1,2";
321 | };
322 | name = Debug;
323 | };
324 | BD85B94D220DC08F00D33BF9 /* Release */ = {
325 | isa = XCBuildConfiguration;
326 | buildSettings = {
327 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
328 | CODE_SIGN_STYLE = Manual;
329 | DEVELOPMENT_TEAM = Z3QQ492P6Z;
330 | INFOPLIST_FILE = DynamicHeightCollectionView/Info.plist;
331 | LD_RUNPATH_SEARCH_PATHS = (
332 | "$(inherited)",
333 | "@executable_path/Frameworks",
334 | );
335 | PRODUCT_BUNDLE_IDENTIFIER = com.infoedge.DynamicHeightCollectionView;
336 | PRODUCT_NAME = "$(TARGET_NAME)";
337 | PROVISIONING_PROFILE_SPECIFIER = "99acres Generic";
338 | SWIFT_VERSION = 4.2;
339 | TARGETED_DEVICE_FAMILY = "1,2";
340 | };
341 | name = Release;
342 | };
343 | /* End XCBuildConfiguration section */
344 |
345 | /* Begin XCConfigurationList section */
346 | BD85B934220DC08B00D33BF9 /* Build configuration list for PBXProject "DynamicHeightCollectionView" */ = {
347 | isa = XCConfigurationList;
348 | buildConfigurations = (
349 | BD85B949220DC08F00D33BF9 /* Debug */,
350 | BD85B94A220DC08F00D33BF9 /* Release */,
351 | );
352 | defaultConfigurationIsVisible = 0;
353 | defaultConfigurationName = Release;
354 | };
355 | BD85B94B220DC08F00D33BF9 /* Build configuration list for PBXNativeTarget "DynamicHeightCollectionView" */ = {
356 | isa = XCConfigurationList;
357 | buildConfigurations = (
358 | BD85B94C220DC08F00D33BF9 /* Debug */,
359 | BD85B94D220DC08F00D33BF9 /* Release */,
360 | );
361 | defaultConfigurationIsVisible = 0;
362 | defaultConfigurationName = Release;
363 | };
364 | /* End XCConfigurationList section */
365 | };
366 | rootObject = BD85B931220DC08B00D33BF9 /* Project object */;
367 | }
368 |
--------------------------------------------------------------------------------