1
0
mirror of https://github.com/metabolist/metatext synced 2025-01-10 09:03:44 +01:00
metatext-app-ios-iphone-ipad/Views/CompositionAttachmentCollectionViewCell.swift
Justin Mazzocchi 4806c43202
wip
2021-01-03 12:01:55 -08:00

20 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)
}
}