2019-12-19 17:32:49 +00:00
|
|
|
/*
|
2023-04-06 09:44:16 +00:00
|
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
2019-12-19 17:32:49 +00:00
|
|
|
*
|
|
|
|
|
* This source code is licensed under the MIT license found in the
|
|
|
|
|
* LICENSE file in the root directory of this source tree.
|
2016-09-07 22:37:59 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
import IGListKit
|
2018-01-22 20:01:53 +00:00
|
|
|
import UIKit
|
2016-09-07 22:37:59 +00:00
|
|
|
|
2017-03-12 20:12:23 +00:00
|
|
|
final class EmbeddedCollectionViewCell: UICollectionViewCell {
|
2016-09-07 22:37:59 +00:00
|
|
|
|
2017-03-31 21:45:28 +00:00
|
|
|
lazy var collectionView: UICollectionView = {
|
2016-09-07 22:37:59 +00:00
|
|
|
let layout = UICollectionViewFlowLayout()
|
|
|
|
|
layout.scrollDirection = .horizontal
|
2017-03-31 21:45:28 +00:00
|
|
|
let view = UICollectionView(frame: .zero, collectionViewLayout: layout)
|
2016-10-24 18:06:17 +00:00
|
|
|
view.backgroundColor = .clear
|
2016-09-07 22:37:59 +00:00
|
|
|
view.alwaysBounceVertical = false
|
|
|
|
|
view.alwaysBounceHorizontal = true
|
|
|
|
|
self.contentView.addSubview(view)
|
|
|
|
|
return view
|
|
|
|
|
}()
|
|
|
|
|
|
|
|
|
|
override func layoutSubviews() {
|
|
|
|
|
super.layoutSubviews()
|
|
|
|
|
collectionView.frame = contentView.frame
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|