mirror of
https://github.com/metabolist/metatext.git
synced 2024-11-28 19:11:30 +00:00
19 lines
714 B
Swift
19 lines
714 B
Swift
// Copyright © 2020 Metabolist. All rights reserved.
|
|
|
|
import UIKit
|
|
import ViewModels
|
|
|
|
class CompositionAttachmentCollectionViewCell: UICollectionViewCell {
|
|
var viewModel: CompositionAttachmentViewModel?
|
|
var parentViewModel: CompositionViewModel?
|
|
|
|
override func updateConfiguration(using state: UICellConfigurationState) {
|
|
guard let viewModel = viewModel, let parentViewModel = parentViewModel else { return }
|
|
|
|
contentConfiguration = CompositionAttachmentContentConfiguration(
|
|
viewModel: viewModel,
|
|
parentViewModel: parentViewModel)
|
|
.updated(for: state)
|
|
backgroundConfiguration = UIBackgroundConfiguration.clear().updated(for: state)
|
|
}
|
|
}
|