Merge pull request #622 from painhapp/refactorPinToParent
[Refactor] Use UIView extension to create constraints (to parent view)
This commit is contained in:
commit
d4eabf95d1
|
@ -58,12 +58,7 @@ final class ComposeViewController: UIViewController, NeedsDependency {
|
||||||
let shadowBackgroundContainer = ShadowBackgroundContainer()
|
let shadowBackgroundContainer = ShadowBackgroundContainer()
|
||||||
publishButton.translatesAutoresizingMaskIntoConstraints = false
|
publishButton.translatesAutoresizingMaskIntoConstraints = false
|
||||||
shadowBackgroundContainer.addSubview(publishButton)
|
shadowBackgroundContainer.addSubview(publishButton)
|
||||||
NSLayoutConstraint.activate([
|
publishButton.pinToParent()
|
||||||
publishButton.topAnchor.constraint(equalTo: shadowBackgroundContainer.topAnchor),
|
|
||||||
publishButton.leadingAnchor.constraint(equalTo: shadowBackgroundContainer.leadingAnchor),
|
|
||||||
publishButton.trailingAnchor.constraint(equalTo: shadowBackgroundContainer.trailingAnchor),
|
|
||||||
publishButton.bottomAnchor.constraint(equalTo: shadowBackgroundContainer.bottomAnchor),
|
|
||||||
])
|
|
||||||
let barButtonItem = UIBarButtonItem(customView: shadowBackgroundContainer)
|
let barButtonItem = UIBarButtonItem(customView: shadowBackgroundContainer)
|
||||||
return barButtonItem
|
return barButtonItem
|
||||||
}()
|
}()
|
||||||
|
@ -102,12 +97,7 @@ extension ComposeViewController {
|
||||||
addChild(composeContentViewController)
|
addChild(composeContentViewController)
|
||||||
composeContentViewController.view.translatesAutoresizingMaskIntoConstraints = false
|
composeContentViewController.view.translatesAutoresizingMaskIntoConstraints = false
|
||||||
view.addSubview(composeContentViewController.view)
|
view.addSubview(composeContentViewController.view)
|
||||||
NSLayoutConstraint.activate([
|
composeContentViewController.view.pinToParent()
|
||||||
composeContentViewController.view.topAnchor.constraint(equalTo: view.topAnchor),
|
|
||||||
composeContentViewController.view.leadingAnchor.constraint(equalTo: view.leadingAnchor),
|
|
||||||
composeContentViewController.view.trailingAnchor.constraint(equalTo: view.trailingAnchor),
|
|
||||||
composeContentViewController.view.bottomAnchor.constraint(equalTo: view.bottomAnchor),
|
|
||||||
])
|
|
||||||
composeContentViewController.didMove(toParent: self)
|
composeContentViewController.didMove(toParent: self)
|
||||||
|
|
||||||
// bind title
|
// bind title
|
||||||
|
|
|
@ -57,12 +57,7 @@ extension DiscoveryCommunityViewController {
|
||||||
|
|
||||||
tableView.translatesAutoresizingMaskIntoConstraints = false
|
tableView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
view.addSubview(tableView)
|
view.addSubview(tableView)
|
||||||
NSLayoutConstraint.activate([
|
tableView.pinToParent()
|
||||||
tableView.topAnchor.constraint(equalTo: view.topAnchor),
|
|
||||||
tableView.leadingAnchor.constraint(equalTo: view.leadingAnchor),
|
|
||||||
tableView.trailingAnchor.constraint(equalTo: view.trailingAnchor),
|
|
||||||
tableView.bottomAnchor.constraint(equalTo: view.bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
tableView.refreshControl = refreshControl
|
tableView.refreshControl = refreshControl
|
||||||
refreshControl.addTarget(self, action: #selector(DiscoveryCommunityViewController.refreshControlValueChanged(_:)), for: .valueChanged)
|
refreshControl.addTarget(self, action: #selector(DiscoveryCommunityViewController.refreshControlValueChanged(_:)), for: .valueChanged)
|
||||||
|
|
|
@ -56,12 +56,7 @@ extension DiscoveryForYouViewController {
|
||||||
|
|
||||||
tableView.translatesAutoresizingMaskIntoConstraints = false
|
tableView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
view.addSubview(tableView)
|
view.addSubview(tableView)
|
||||||
NSLayoutConstraint.activate([
|
tableView.pinToParent()
|
||||||
tableView.topAnchor.constraint(equalTo: view.topAnchor),
|
|
||||||
tableView.leadingAnchor.constraint(equalTo: view.leadingAnchor),
|
|
||||||
tableView.trailingAnchor.constraint(equalTo: view.trailingAnchor),
|
|
||||||
tableView.bottomAnchor.constraint(equalTo: view.bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
tableView.delegate = self
|
tableView.delegate = self
|
||||||
viewModel.setupDiffableDataSource(
|
viewModel.setupDiffableDataSource(
|
||||||
|
|
|
@ -56,12 +56,7 @@ extension DiscoveryHashtagsViewController {
|
||||||
|
|
||||||
tableView.translatesAutoresizingMaskIntoConstraints = false
|
tableView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
view.addSubview(tableView)
|
view.addSubview(tableView)
|
||||||
NSLayoutConstraint.activate([
|
tableView.pinToParent()
|
||||||
tableView.topAnchor.constraint(equalTo: view.topAnchor),
|
|
||||||
tableView.leadingAnchor.constraint(equalTo: view.leadingAnchor),
|
|
||||||
tableView.trailingAnchor.constraint(equalTo: view.trailingAnchor),
|
|
||||||
tableView.bottomAnchor.constraint(equalTo: view.bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
tableView.refreshControl = refreshControl
|
tableView.refreshControl = refreshControl
|
||||||
refreshControl.addTarget(self, action: #selector(DiscoveryHashtagsViewController.refreshControlValueChanged(_:)), for: .valueChanged)
|
refreshControl.addTarget(self, action: #selector(DiscoveryHashtagsViewController.refreshControlValueChanged(_:)), for: .valueChanged)
|
||||||
|
|
|
@ -56,12 +56,7 @@ extension DiscoveryNewsViewController {
|
||||||
|
|
||||||
tableView.translatesAutoresizingMaskIntoConstraints = false
|
tableView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
view.addSubview(tableView)
|
view.addSubview(tableView)
|
||||||
NSLayoutConstraint.activate([
|
tableView.pinToParent()
|
||||||
tableView.topAnchor.constraint(equalTo: view.topAnchor),
|
|
||||||
tableView.leadingAnchor.constraint(equalTo: view.leadingAnchor),
|
|
||||||
tableView.trailingAnchor.constraint(equalTo: view.trailingAnchor),
|
|
||||||
tableView.bottomAnchor.constraint(equalTo: view.bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
tableView.delegate = self
|
tableView.delegate = self
|
||||||
viewModel.setupDiffableDataSource(
|
viewModel.setupDiffableDataSource(
|
||||||
|
|
|
@ -58,12 +58,7 @@ extension DiscoveryPostsViewController {
|
||||||
|
|
||||||
tableView.translatesAutoresizingMaskIntoConstraints = false
|
tableView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
view.addSubview(tableView)
|
view.addSubview(tableView)
|
||||||
NSLayoutConstraint.activate([
|
tableView.pinToParent()
|
||||||
tableView.topAnchor.constraint(equalTo: view.topAnchor),
|
|
||||||
tableView.leadingAnchor.constraint(equalTo: view.leadingAnchor),
|
|
||||||
tableView.trailingAnchor.constraint(equalTo: view.trailingAnchor),
|
|
||||||
tableView.bottomAnchor.constraint(equalTo: view.bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
discoveryIntroBannerView.translatesAutoresizingMaskIntoConstraints = false
|
discoveryIntroBannerView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
view.addSubview(discoveryIntroBannerView)
|
view.addSubview(discoveryIntroBannerView)
|
||||||
|
|
|
@ -80,12 +80,7 @@ extension HashtagTimelineViewController {
|
||||||
|
|
||||||
tableView.translatesAutoresizingMaskIntoConstraints = false
|
tableView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
view.addSubview(tableView)
|
view.addSubview(tableView)
|
||||||
NSLayoutConstraint.activate([
|
tableView.pinToParent()
|
||||||
tableView.topAnchor.constraint(equalTo: view.topAnchor),
|
|
||||||
tableView.leadingAnchor.constraint(equalTo: view.leadingAnchor),
|
|
||||||
tableView.trailingAnchor.constraint(equalTo: view.trailingAnchor),
|
|
||||||
tableView.bottomAnchor.constraint(equalTo: view.bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
tableView.delegate = self
|
tableView.delegate = self
|
||||||
viewModel.setupDiffableDataSource(
|
viewModel.setupDiffableDataSource(
|
||||||
|
|
|
@ -158,12 +158,7 @@ extension HomeTimelineViewController {
|
||||||
|
|
||||||
tableView.translatesAutoresizingMaskIntoConstraints = false
|
tableView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
view.addSubview(tableView)
|
view.addSubview(tableView)
|
||||||
NSLayoutConstraint.activate([
|
tableView.pinToParent()
|
||||||
tableView.topAnchor.constraint(equalTo: view.topAnchor),
|
|
||||||
tableView.leadingAnchor.constraint(equalTo: view.leadingAnchor),
|
|
||||||
tableView.trailingAnchor.constraint(equalTo: view.trailingAnchor),
|
|
||||||
tableView.bottomAnchor.constraint(equalTo: view.bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
// // layout publish progress
|
// // layout publish progress
|
||||||
publishProgressView.translatesAutoresizingMaskIntoConstraints = false
|
publishProgressView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
|
|
|
@ -47,12 +47,7 @@ extension HomeTimelineNavigationBarTitleView {
|
||||||
private func _init() {
|
private func _init() {
|
||||||
containerView.translatesAutoresizingMaskIntoConstraints = false
|
containerView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
addSubview(containerView)
|
addSubview(containerView)
|
||||||
NSLayoutConstraint.activate([
|
containerView.pinToParent()
|
||||||
containerView.topAnchor.constraint(equalTo: topAnchor),
|
|
||||||
containerView.leadingAnchor.constraint(equalTo: leadingAnchor),
|
|
||||||
containerView.trailingAnchor.constraint(equalTo: trailingAnchor),
|
|
||||||
containerView.bottomAnchor.constraint(equalTo: bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
containerView.addArrangedSubview(logoButton)
|
containerView.addArrangedSubview(logoButton)
|
||||||
button.translatesAutoresizingMaskIntoConstraints = false
|
button.translatesAutoresizingMaskIntoConstraints = false
|
||||||
|
|
|
@ -65,12 +65,7 @@ extension MediaPreviewViewController {
|
||||||
pagingViewController.view.translatesAutoresizingMaskIntoConstraints = false
|
pagingViewController.view.translatesAutoresizingMaskIntoConstraints = false
|
||||||
addChild(pagingViewController)
|
addChild(pagingViewController)
|
||||||
visualEffectView.contentView.addSubview(pagingViewController.view)
|
visualEffectView.contentView.addSubview(pagingViewController.view)
|
||||||
NSLayoutConstraint.activate([
|
visualEffectView.pinTo(to: pagingViewController.view)
|
||||||
visualEffectView.topAnchor.constraint(equalTo: pagingViewController.view.topAnchor),
|
|
||||||
visualEffectView.bottomAnchor.constraint(equalTo: pagingViewController.view.bottomAnchor),
|
|
||||||
visualEffectView.leadingAnchor.constraint(equalTo: pagingViewController.view.leadingAnchor),
|
|
||||||
visualEffectView.trailingAnchor.constraint(equalTo: pagingViewController.view.trailingAnchor),
|
|
||||||
])
|
|
||||||
pagingViewController.didMove(toParent: self)
|
pagingViewController.didMove(toParent: self)
|
||||||
|
|
||||||
closeButtonBackground.translatesAutoresizingMaskIntoConstraints = false
|
closeButtonBackground.translatesAutoresizingMaskIntoConstraints = false
|
||||||
|
|
|
@ -39,23 +39,13 @@ extension MediaPreviewVideoViewController {
|
||||||
addChild(playerViewController)
|
addChild(playerViewController)
|
||||||
playerViewController.view.translatesAutoresizingMaskIntoConstraints = false
|
playerViewController.view.translatesAutoresizingMaskIntoConstraints = false
|
||||||
view.addSubview(playerViewController.view)
|
view.addSubview(playerViewController.view)
|
||||||
NSLayoutConstraint.activate([
|
playerViewController.view.pinToParent()
|
||||||
playerViewController.view.centerXAnchor.constraint(equalTo: view.centerXAnchor),
|
|
||||||
playerViewController.view.centerYAnchor.constraint(equalTo: view.centerYAnchor),
|
|
||||||
playerViewController.view.widthAnchor.constraint(equalTo: view.widthAnchor),
|
|
||||||
playerViewController.view.heightAnchor.constraint(equalTo: view.heightAnchor),
|
|
||||||
])
|
|
||||||
playerViewController.didMove(toParent: self)
|
playerViewController.didMove(toParent: self)
|
||||||
|
|
||||||
if let contentOverlayView = playerViewController.contentOverlayView {
|
if let contentOverlayView = playerViewController.contentOverlayView {
|
||||||
previewImageView.translatesAutoresizingMaskIntoConstraints = false
|
previewImageView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
contentOverlayView.addSubview(previewImageView)
|
contentOverlayView.addSubview(previewImageView)
|
||||||
NSLayoutConstraint.activate([
|
previewImageView.pinToParent()
|
||||||
previewImageView.topAnchor.constraint(equalTo: contentOverlayView.topAnchor),
|
|
||||||
previewImageView.leadingAnchor.constraint(equalTo: contentOverlayView.leadingAnchor),
|
|
||||||
previewImageView.trailingAnchor.constraint(equalTo: contentOverlayView.trailingAnchor),
|
|
||||||
previewImageView.bottomAnchor.constraint(equalTo: contentOverlayView.bottomAnchor),
|
|
||||||
])
|
|
||||||
}
|
}
|
||||||
|
|
||||||
playerViewController.delegate = self
|
playerViewController.delegate = self
|
||||||
|
|
|
@ -55,12 +55,7 @@ extension NotificationTimelineViewController {
|
||||||
|
|
||||||
tableView.translatesAutoresizingMaskIntoConstraints = false
|
tableView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
view.addSubview(tableView)
|
view.addSubview(tableView)
|
||||||
NSLayoutConstraint.activate([
|
tableView.pinToParent()
|
||||||
tableView.topAnchor.constraint(equalTo: view.topAnchor),
|
|
||||||
tableView.leadingAnchor.constraint(equalTo: view.leadingAnchor),
|
|
||||||
tableView.trailingAnchor.constraint(equalTo: view.trailingAnchor),
|
|
||||||
tableView.bottomAnchor.constraint(equalTo: view.bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
tableView.delegate = self
|
tableView.delegate = self
|
||||||
viewModel.setupDiffableDataSource(
|
viewModel.setupDiffableDataSource(
|
||||||
|
|
|
@ -48,12 +48,7 @@ extension PickServerCategoryView {
|
||||||
|
|
||||||
container.translatesAutoresizingMaskIntoConstraints = false
|
container.translatesAutoresizingMaskIntoConstraints = false
|
||||||
addSubview(container)
|
addSubview(container)
|
||||||
NSLayoutConstraint.activate([
|
container.pinToParent()
|
||||||
container.topAnchor.constraint(equalTo: topAnchor),
|
|
||||||
container.leadingAnchor.constraint(equalTo: leadingAnchor),
|
|
||||||
container.trailingAnchor.constraint(equalTo: trailingAnchor),
|
|
||||||
container.bottomAnchor.constraint(equalTo: bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
container.addArrangedSubview(titleLabel)
|
container.addArrangedSubview(titleLabel)
|
||||||
highlightedIndicatorView.translatesAutoresizingMaskIntoConstraints = false
|
highlightedIndicatorView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
|
|
|
@ -85,12 +85,7 @@ extension MastodonRegisterViewController {
|
||||||
addChild(hostingViewController)
|
addChild(hostingViewController)
|
||||||
hostingViewController.view.translatesAutoresizingMaskIntoConstraints = false
|
hostingViewController.view.translatesAutoresizingMaskIntoConstraints = false
|
||||||
view.addSubview(hostingViewController.view)
|
view.addSubview(hostingViewController.view)
|
||||||
NSLayoutConstraint.activate([
|
hostingViewController.view.pinToParent()
|
||||||
hostingViewController.view.topAnchor.constraint(equalTo: view.topAnchor),
|
|
||||||
hostingViewController.view.leadingAnchor.constraint(equalTo: view.leadingAnchor),
|
|
||||||
hostingViewController.view.trailingAnchor.constraint(equalTo: view.trailingAnchor),
|
|
||||||
hostingViewController.view.bottomAnchor.constraint(equalTo: view.bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
navigationActionView.translatesAutoresizingMaskIntoConstraints = false
|
navigationActionView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
view.addSubview(navigationActionView)
|
view.addSubview(navigationActionView)
|
||||||
|
|
|
@ -49,12 +49,7 @@ extension MastodonResendEmailViewController {
|
||||||
|
|
||||||
webView.translatesAutoresizingMaskIntoConstraints = false
|
webView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
view.addSubview(webView)
|
view.addSubview(webView)
|
||||||
NSLayoutConstraint.activate([
|
webView.pinToParent()
|
||||||
webView.topAnchor.constraint(equalTo: view.topAnchor),
|
|
||||||
webView.leadingAnchor.constraint(equalTo: view.leadingAnchor),
|
|
||||||
webView.trailingAnchor.constraint(equalTo: view.trailingAnchor),
|
|
||||||
webView.bottomAnchor.constraint(equalTo: view.bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
let request = URLRequest(url: viewModel.resendEmailURL)
|
let request = URLRequest(url: viewModel.resendEmailURL)
|
||||||
webView.navigationDelegate = self.viewModel.navigationDelegate
|
webView.navigationDelegate = self.viewModel.navigationDelegate
|
||||||
|
|
|
@ -69,12 +69,7 @@ extension MastodonServerRulesViewController {
|
||||||
|
|
||||||
tableView.translatesAutoresizingMaskIntoConstraints = false
|
tableView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
view.addSubview(tableView)
|
view.addSubview(tableView)
|
||||||
NSLayoutConstraint.activate([
|
tableView.pinToParent()
|
||||||
tableView.topAnchor.constraint(equalTo: view.topAnchor),
|
|
||||||
tableView.leadingAnchor.constraint(equalTo: view.leadingAnchor),
|
|
||||||
tableView.trailingAnchor.constraint(equalTo: view.trailingAnchor),
|
|
||||||
tableView.bottomAnchor.constraint(equalTo: view.bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
navigationActionView.translatesAutoresizingMaskIntoConstraints = false
|
navigationActionView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
view.addSubview(navigationActionView)
|
view.addSubview(navigationActionView)
|
||||||
|
|
|
@ -84,21 +84,11 @@ extension NavigationActionView {
|
||||||
|
|
||||||
backButton.translatesAutoresizingMaskIntoConstraints = false
|
backButton.translatesAutoresizingMaskIntoConstraints = false
|
||||||
backButtonShadowContainer.addSubview(backButton)
|
backButtonShadowContainer.addSubview(backButton)
|
||||||
NSLayoutConstraint.activate([
|
backButton.pinToParent()
|
||||||
backButton.topAnchor.constraint(equalTo: backButtonShadowContainer.topAnchor),
|
|
||||||
backButton.leadingAnchor.constraint(equalTo: backButtonShadowContainer.leadingAnchor),
|
|
||||||
backButton.trailingAnchor.constraint(equalTo: backButtonShadowContainer.trailingAnchor),
|
|
||||||
backButton.bottomAnchor.constraint(equalTo: backButtonShadowContainer.bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
nextButton.translatesAutoresizingMaskIntoConstraints = false
|
nextButton.translatesAutoresizingMaskIntoConstraints = false
|
||||||
nextButtonShadowContainer.addSubview(nextButton)
|
nextButtonShadowContainer.addSubview(nextButton)
|
||||||
NSLayoutConstraint.activate([
|
nextButton.pinToParent()
|
||||||
nextButton.topAnchor.constraint(equalTo: nextButtonShadowContainer.topAnchor),
|
|
||||||
nextButton.leadingAnchor.constraint(equalTo: nextButtonShadowContainer.leadingAnchor),
|
|
||||||
nextButton.trailingAnchor.constraint(equalTo: nextButtonShadowContainer.trailingAnchor),
|
|
||||||
nextButton.bottomAnchor.constraint(equalTo: nextButtonShadowContainer.bottomAnchor),
|
|
||||||
])
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,12 +20,7 @@ extension OnboardingNavigationController {
|
||||||
|
|
||||||
gradientBorderView.translatesAutoresizingMaskIntoConstraints = false
|
gradientBorderView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
view.addSubview(gradientBorderView)
|
view.addSubview(gradientBorderView)
|
||||||
NSLayoutConstraint.activate([
|
gradientBorderView.pinToParent()
|
||||||
gradientBorderView.topAnchor.constraint(equalTo: view.topAnchor),
|
|
||||||
gradientBorderView.leadingAnchor.constraint(equalTo: view.leadingAnchor),
|
|
||||||
gradientBorderView.trailingAnchor.constraint(equalTo: view.trailingAnchor),
|
|
||||||
gradientBorderView.bottomAnchor.constraint(equalTo: view.bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
updateBorderViewDisplay()
|
updateBorderViewDisplay()
|
||||||
}
|
}
|
||||||
|
|
|
@ -96,12 +96,7 @@ extension WelcomeIllustrationView {
|
||||||
].forEach { imageView in
|
].forEach { imageView in
|
||||||
imageView.translatesAutoresizingMaskIntoConstraints = false
|
imageView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
addSubview(imageView)
|
addSubview(imageView)
|
||||||
NSLayoutConstraint.activate([
|
imageView.pinTo(to: cloudBaseImageView)
|
||||||
imageView.topAnchor.constraint(equalTo: cloudBaseImageView.topAnchor),
|
|
||||||
imageView.leadingAnchor.constraint(equalTo: cloudBaseImageView.leadingAnchor),
|
|
||||||
imageView.trailingAnchor.constraint(equalTo: cloudBaseImageView.trailingAnchor),
|
|
||||||
imageView.bottomAnchor.constraint(equalTo: cloudBaseImageView.bottomAnchor),
|
|
||||||
])
|
|
||||||
}
|
}
|
||||||
|
|
||||||
aspectLayoutConstraint = cloudBaseImageView.widthAnchor.constraint(equalTo: cloudBaseImageView.heightAnchor, multiplier: layout.artworkImageSize.width / layout.artworkImageSize.height)
|
aspectLayoutConstraint = cloudBaseImageView.widthAnchor.constraint(equalTo: cloudBaseImageView.heightAnchor, multiplier: layout.artworkImageSize.width / layout.artworkImageSize.height)
|
||||||
|
|
|
@ -124,22 +124,12 @@ extension WelcomeViewController {
|
||||||
signUpButtonShadowView.translatesAutoresizingMaskIntoConstraints = false
|
signUpButtonShadowView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
buttonContainer.addSubview(signUpButtonShadowView)
|
buttonContainer.addSubview(signUpButtonShadowView)
|
||||||
buttonContainer.sendSubviewToBack(signUpButtonShadowView)
|
buttonContainer.sendSubviewToBack(signUpButtonShadowView)
|
||||||
NSLayoutConstraint.activate([
|
signUpButtonShadowView.pinTo(to: signUpButton)
|
||||||
signUpButtonShadowView.topAnchor.constraint(equalTo: signUpButton.topAnchor),
|
|
||||||
signUpButtonShadowView.leadingAnchor.constraint(equalTo: signUpButton.leadingAnchor),
|
|
||||||
signUpButtonShadowView.trailingAnchor.constraint(equalTo: signUpButton.trailingAnchor),
|
|
||||||
signUpButtonShadowView.bottomAnchor.constraint(equalTo: signUpButton.bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
signInButtonShadowView.translatesAutoresizingMaskIntoConstraints = false
|
signInButtonShadowView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
buttonContainer.addSubview(signInButtonShadowView)
|
buttonContainer.addSubview(signInButtonShadowView)
|
||||||
buttonContainer.sendSubviewToBack(signInButtonShadowView)
|
buttonContainer.sendSubviewToBack(signInButtonShadowView)
|
||||||
NSLayoutConstraint.activate([
|
signInButtonShadowView.pinTo(to: signInButton)
|
||||||
signInButtonShadowView.topAnchor.constraint(equalTo: signInButton.topAnchor),
|
|
||||||
signInButtonShadowView.leadingAnchor.constraint(equalTo: signInButton.leadingAnchor),
|
|
||||||
signInButtonShadowView.trailingAnchor.constraint(equalTo: signInButton.trailingAnchor),
|
|
||||||
signInButtonShadowView.bottomAnchor.constraint(equalTo: signInButton.bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
signUpButton.addTarget(self, action: #selector(signUpButtonDidClicked(_:)), for: .touchUpInside)
|
signUpButton.addTarget(self, action: #selector(signUpButtonDidClicked(_:)), for: .touchUpInside)
|
||||||
signInButton.addTarget(self, action: #selector(signInButtonDidClicked(_:)), for: .touchUpInside)
|
signInButton.addTarget(self, action: #selector(signInButtonDidClicked(_:)), for: .touchUpInside)
|
||||||
|
|
|
@ -60,12 +60,7 @@ extension ProfileAboutViewController {
|
||||||
|
|
||||||
collectionView.translatesAutoresizingMaskIntoConstraints = false
|
collectionView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
view.addSubview(collectionView)
|
view.addSubview(collectionView)
|
||||||
NSLayoutConstraint.activate([
|
collectionView.pinToParent()
|
||||||
collectionView.topAnchor.constraint(equalTo: view.topAnchor),
|
|
||||||
collectionView.leadingAnchor.constraint(equalTo: view.leadingAnchor),
|
|
||||||
collectionView.trailingAnchor.constraint(equalTo: view.trailingAnchor),
|
|
||||||
collectionView.bottomAnchor.constraint(equalTo: view.bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
collectionView.delegate = self
|
collectionView.delegate = self
|
||||||
viewModel.setupDiffableDataSource(
|
viewModel.setupDiffableDataSource(
|
||||||
|
|
|
@ -64,12 +64,7 @@ extension BookmarkViewController {
|
||||||
|
|
||||||
tableView.translatesAutoresizingMaskIntoConstraints = false
|
tableView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
view.addSubview(tableView)
|
view.addSubview(tableView)
|
||||||
NSLayoutConstraint.activate([
|
tableView.pinToParent()
|
||||||
tableView.topAnchor.constraint(equalTo: view.topAnchor),
|
|
||||||
tableView.leadingAnchor.constraint(equalTo: view.leadingAnchor),
|
|
||||||
tableView.trailingAnchor.constraint(equalTo: view.trailingAnchor),
|
|
||||||
tableView.bottomAnchor.constraint(equalTo: view.bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
tableView.delegate = self
|
tableView.delegate = self
|
||||||
viewModel.setupDiffableDataSource(
|
viewModel.setupDiffableDataSource(
|
||||||
|
|
|
@ -53,12 +53,7 @@ extension FamiliarFollowersViewController {
|
||||||
|
|
||||||
tableView.translatesAutoresizingMaskIntoConstraints = false
|
tableView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
view.addSubview(tableView)
|
view.addSubview(tableView)
|
||||||
NSLayoutConstraint.activate([
|
tableView.pinToParent()
|
||||||
tableView.topAnchor.constraint(equalTo: view.topAnchor),
|
|
||||||
tableView.leadingAnchor.constraint(equalTo: view.leadingAnchor),
|
|
||||||
tableView.trailingAnchor.constraint(equalTo: view.trailingAnchor),
|
|
||||||
tableView.bottomAnchor.constraint(equalTo: view.bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
tableView.delegate = self
|
tableView.delegate = self
|
||||||
viewModel.setupDiffableDataSource(
|
viewModel.setupDiffableDataSource(
|
||||||
|
|
|
@ -67,12 +67,7 @@ extension FavoriteViewController {
|
||||||
|
|
||||||
tableView.translatesAutoresizingMaskIntoConstraints = false
|
tableView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
view.addSubview(tableView)
|
view.addSubview(tableView)
|
||||||
NSLayoutConstraint.activate([
|
tableView.pinToParent()
|
||||||
tableView.topAnchor.constraint(equalTo: view.topAnchor),
|
|
||||||
tableView.leadingAnchor.constraint(equalTo: view.leadingAnchor),
|
|
||||||
tableView.trailingAnchor.constraint(equalTo: view.trailingAnchor),
|
|
||||||
tableView.bottomAnchor.constraint(equalTo: view.bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
tableView.delegate = self
|
tableView.delegate = self
|
||||||
viewModel.setupDiffableDataSource(
|
viewModel.setupDiffableDataSource(
|
||||||
|
|
|
@ -58,12 +58,7 @@ extension FollowerListViewController {
|
||||||
|
|
||||||
tableView.translatesAutoresizingMaskIntoConstraints = false
|
tableView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
view.addSubview(tableView)
|
view.addSubview(tableView)
|
||||||
NSLayoutConstraint.activate([
|
tableView.pinToParent()
|
||||||
tableView.topAnchor.constraint(equalTo: view.topAnchor),
|
|
||||||
tableView.leadingAnchor.constraint(equalTo: view.leadingAnchor),
|
|
||||||
tableView.trailingAnchor.constraint(equalTo: view.trailingAnchor),
|
|
||||||
tableView.bottomAnchor.constraint(equalTo: view.bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
tableView.delegate = self
|
tableView.delegate = self
|
||||||
viewModel.setupDiffableDataSource(
|
viewModel.setupDiffableDataSource(
|
||||||
|
|
|
@ -58,12 +58,7 @@ extension FollowingListViewController {
|
||||||
|
|
||||||
tableView.translatesAutoresizingMaskIntoConstraints = false
|
tableView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
view.addSubview(tableView)
|
view.addSubview(tableView)
|
||||||
NSLayoutConstraint.activate([
|
tableView.pinToParent()
|
||||||
tableView.topAnchor.constraint(equalTo: view.topAnchor),
|
|
||||||
tableView.leadingAnchor.constraint(equalTo: view.leadingAnchor),
|
|
||||||
tableView.trailingAnchor.constraint(equalTo: view.trailingAnchor),
|
|
||||||
tableView.bottomAnchor.constraint(equalTo: view.bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
tableView.delegate = self
|
tableView.delegate = self
|
||||||
viewModel.setupDiffableDataSource(
|
viewModel.setupDiffableDataSource(
|
||||||
|
|
|
@ -275,21 +275,11 @@ extension ProfileHeaderView {
|
||||||
|
|
||||||
bannerImageViewOverlayVisualEffectView.translatesAutoresizingMaskIntoConstraints = false
|
bannerImageViewOverlayVisualEffectView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
bannerImageView.addSubview(bannerImageViewOverlayVisualEffectView)
|
bannerImageView.addSubview(bannerImageViewOverlayVisualEffectView)
|
||||||
NSLayoutConstraint.activate([
|
bannerImageViewOverlayVisualEffectView.pinToParent()
|
||||||
bannerImageViewOverlayVisualEffectView.topAnchor.constraint(equalTo: bannerImageView.topAnchor),
|
|
||||||
bannerImageViewOverlayVisualEffectView.leadingAnchor.constraint(equalTo: bannerImageView.leadingAnchor),
|
|
||||||
bannerImageViewOverlayVisualEffectView.trailingAnchor.constraint(equalTo: bannerImageView.trailingAnchor),
|
|
||||||
bannerImageViewOverlayVisualEffectView.bottomAnchor.constraint(equalTo: bannerImageView.bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
editBannerButton.translatesAutoresizingMaskIntoConstraints = false
|
editBannerButton.translatesAutoresizingMaskIntoConstraints = false
|
||||||
bannerContainerView.addSubview(editBannerButton)
|
bannerContainerView.addSubview(editBannerButton)
|
||||||
NSLayoutConstraint.activate([
|
editBannerButton.pinTo(to: bannerImageView)
|
||||||
editBannerButton.topAnchor.constraint(equalTo: bannerImageView.topAnchor),
|
|
||||||
editBannerButton.leadingAnchor.constraint(equalTo: bannerImageView.leadingAnchor),
|
|
||||||
editBannerButton.trailingAnchor.constraint(equalTo: bannerImageView.trailingAnchor),
|
|
||||||
editBannerButton.bottomAnchor.constraint(equalTo: bannerImageView.bottomAnchor),
|
|
||||||
])
|
|
||||||
bannerContainerView.isUserInteractionEnabled = true
|
bannerContainerView.isUserInteractionEnabled = true
|
||||||
|
|
||||||
// follows you
|
// follows you
|
||||||
|
@ -306,12 +296,7 @@ extension ProfileHeaderView {
|
||||||
|
|
||||||
followsYouVibrantEffectView.translatesAutoresizingMaskIntoConstraints = false
|
followsYouVibrantEffectView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
followsYouBlurEffectView.contentView.addSubview(followsYouVibrantEffectView)
|
followsYouBlurEffectView.contentView.addSubview(followsYouVibrantEffectView)
|
||||||
NSLayoutConstraint.activate([
|
followsYouVibrantEffectView.pinTo(to: followsYouBlurEffectView)
|
||||||
followsYouVibrantEffectView.topAnchor.constraint(equalTo: followsYouBlurEffectView.topAnchor),
|
|
||||||
followsYouVibrantEffectView.leadingAnchor.constraint(equalTo: followsYouBlurEffectView.leadingAnchor),
|
|
||||||
followsYouVibrantEffectView.trailingAnchor.constraint(equalTo: followsYouBlurEffectView.trailingAnchor),
|
|
||||||
followsYouVibrantEffectView.bottomAnchor.constraint(equalTo: followsYouBlurEffectView.bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
followsYouLabel.translatesAutoresizingMaskIntoConstraints = false
|
followsYouLabel.translatesAutoresizingMaskIntoConstraints = false
|
||||||
followsYouVibrantEffectView.contentView.addSubview(followsYouLabel)
|
followsYouVibrantEffectView.contentView.addSubview(followsYouLabel)
|
||||||
|
@ -347,30 +332,15 @@ extension ProfileHeaderView {
|
||||||
|
|
||||||
avatarImageViewOverlayVisualEffectView.translatesAutoresizingMaskIntoConstraints = false
|
avatarImageViewOverlayVisualEffectView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
avatarImageViewBackgroundView.addSubview(avatarImageViewOverlayVisualEffectView)
|
avatarImageViewBackgroundView.addSubview(avatarImageViewOverlayVisualEffectView)
|
||||||
NSLayoutConstraint.activate([
|
avatarImageViewOverlayVisualEffectView.pinToParent()
|
||||||
avatarImageViewOverlayVisualEffectView.topAnchor.constraint(equalTo: avatarImageViewBackgroundView.topAnchor),
|
|
||||||
avatarImageViewOverlayVisualEffectView.leadingAnchor.constraint(equalTo: avatarImageViewBackgroundView.leadingAnchor),
|
|
||||||
avatarImageViewOverlayVisualEffectView.trailingAnchor.constraint(equalTo: avatarImageViewBackgroundView.trailingAnchor),
|
|
||||||
avatarImageViewOverlayVisualEffectView.bottomAnchor.constraint(equalTo: avatarImageViewBackgroundView.bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
editAvatarBackgroundView.translatesAutoresizingMaskIntoConstraints = false
|
editAvatarBackgroundView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
avatarButton.addSubview(editAvatarBackgroundView)
|
avatarButton.addSubview(editAvatarBackgroundView)
|
||||||
NSLayoutConstraint.activate([
|
editAvatarBackgroundView.pinToParent()
|
||||||
editAvatarBackgroundView.topAnchor.constraint(equalTo: avatarButton.topAnchor),
|
|
||||||
editAvatarBackgroundView.leadingAnchor.constraint(equalTo: avatarButton.leadingAnchor),
|
|
||||||
editAvatarBackgroundView.trailingAnchor.constraint(equalTo: avatarButton.trailingAnchor),
|
|
||||||
editAvatarBackgroundView.bottomAnchor.constraint(equalTo: avatarButton.bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
editAvatarButtonOverlayIndicatorView.translatesAutoresizingMaskIntoConstraints = false
|
editAvatarButtonOverlayIndicatorView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
editAvatarBackgroundView.addSubview(editAvatarButtonOverlayIndicatorView)
|
editAvatarBackgroundView.addSubview(editAvatarButtonOverlayIndicatorView)
|
||||||
NSLayoutConstraint.activate([
|
editAvatarButtonOverlayIndicatorView.pinToParent()
|
||||||
editAvatarButtonOverlayIndicatorView.topAnchor.constraint(equalTo: editAvatarBackgroundView.topAnchor),
|
|
||||||
editAvatarButtonOverlayIndicatorView.leadingAnchor.constraint(equalTo: editAvatarBackgroundView.leadingAnchor),
|
|
||||||
editAvatarButtonOverlayIndicatorView.trailingAnchor.constraint(equalTo: editAvatarBackgroundView.trailingAnchor),
|
|
||||||
editAvatarButtonOverlayIndicatorView.bottomAnchor.constraint(equalTo: editAvatarBackgroundView.bottomAnchor),
|
|
||||||
])
|
|
||||||
editAvatarBackgroundView.isUserInteractionEnabled = true
|
editAvatarBackgroundView.isUserInteractionEnabled = true
|
||||||
avatarButton.isUserInteractionEnabled = true
|
avatarButton.isUserInteractionEnabled = true
|
||||||
|
|
||||||
|
@ -456,11 +426,8 @@ extension ProfileHeaderView {
|
||||||
|
|
||||||
relationshipActionButton.translatesAutoresizingMaskIntoConstraints = false
|
relationshipActionButton.translatesAutoresizingMaskIntoConstraints = false
|
||||||
relationshipActionButtonShadowContainer.addSubview(relationshipActionButton)
|
relationshipActionButtonShadowContainer.addSubview(relationshipActionButton)
|
||||||
|
relationshipActionButton.pinToParent()
|
||||||
NSLayoutConstraint.activate([
|
NSLayoutConstraint.activate([
|
||||||
relationshipActionButton.topAnchor.constraint(equalTo: relationshipActionButtonShadowContainer.topAnchor),
|
|
||||||
relationshipActionButton.leadingAnchor.constraint(equalTo: relationshipActionButtonShadowContainer.leadingAnchor),
|
|
||||||
relationshipActionButton.trailingAnchor.constraint(equalTo: relationshipActionButtonShadowContainer.trailingAnchor),
|
|
||||||
relationshipActionButton.bottomAnchor.constraint(equalTo: relationshipActionButtonShadowContainer.bottomAnchor),
|
|
||||||
relationshipActionButton.widthAnchor.constraint(greaterThanOrEqualToConstant: ProfileHeaderView.friendshipActionButtonSize.width).priority(.required - 1),
|
relationshipActionButton.widthAnchor.constraint(greaterThanOrEqualToConstant: ProfileHeaderView.friendshipActionButtonSize.width).priority(.required - 1),
|
||||||
relationshipActionButton.heightAnchor.constraint(equalToConstant: ProfileHeaderView.friendshipActionButtonSize.height).priority(.defaultHigh),
|
relationshipActionButton.heightAnchor.constraint(equalToConstant: ProfileHeaderView.friendshipActionButtonSize.height).priority(.defaultHigh),
|
||||||
])
|
])
|
||||||
|
|
|
@ -99,12 +99,7 @@ extension ProfilePagingViewController {
|
||||||
if let buttonBarView = self.buttonBarView {
|
if let buttonBarView = self.buttonBarView {
|
||||||
buttonBarShadowView.translatesAutoresizingMaskIntoConstraints = false
|
buttonBarShadowView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
view.insertSubview(buttonBarShadowView, belowSubview: buttonBarView)
|
view.insertSubview(buttonBarShadowView, belowSubview: buttonBarView)
|
||||||
NSLayoutConstraint.activate([
|
buttonBarShadowView.pinTo(to: buttonBarView)
|
||||||
buttonBarShadowView.topAnchor.constraint(equalTo: buttonBarView.topAnchor),
|
|
||||||
buttonBarShadowView.leadingAnchor.constraint(equalTo: buttonBarView.leadingAnchor),
|
|
||||||
buttonBarShadowView.trailingAnchor.constraint(equalTo: buttonBarView.trailingAnchor),
|
|
||||||
buttonBarShadowView.bottomAnchor.constraint(equalTo: buttonBarView.bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
viewModel.$needsSetupBottomShadow
|
viewModel.$needsSetupBottomShadow
|
||||||
.receive(on: DispatchQueue.main)
|
.receive(on: DispatchQueue.main)
|
||||||
|
|
|
@ -259,12 +259,7 @@ extension ProfileViewController {
|
||||||
tabBarPagerController.view.translatesAutoresizingMaskIntoConstraints = false
|
tabBarPagerController.view.translatesAutoresizingMaskIntoConstraints = false
|
||||||
view.addSubview(tabBarPagerController.view)
|
view.addSubview(tabBarPagerController.view)
|
||||||
tabBarPagerController.didMove(toParent: self)
|
tabBarPagerController.didMove(toParent: self)
|
||||||
NSLayoutConstraint.activate([
|
tabBarPagerController.view.pinToParent()
|
||||||
tabBarPagerController.view.topAnchor.constraint(equalTo: view.topAnchor),
|
|
||||||
tabBarPagerController.view.leadingAnchor.constraint(equalTo: view.leadingAnchor),
|
|
||||||
tabBarPagerController.view.trailingAnchor.constraint(equalTo: view.trailingAnchor),
|
|
||||||
tabBarPagerController.view.bottomAnchor.constraint(equalTo: view.bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
tabBarPagerController.delegate = self
|
tabBarPagerController.delegate = self
|
||||||
tabBarPagerController.dataSource = self
|
tabBarPagerController.dataSource = self
|
||||||
|
|
|
@ -60,12 +60,7 @@ extension UserTimelineViewController {
|
||||||
|
|
||||||
tableView.translatesAutoresizingMaskIntoConstraints = false
|
tableView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
view.addSubview(tableView)
|
view.addSubview(tableView)
|
||||||
NSLayoutConstraint.activate([
|
tableView.pinToParent()
|
||||||
tableView.topAnchor.constraint(equalTo: view.topAnchor),
|
|
||||||
tableView.leadingAnchor.constraint(equalTo: view.leadingAnchor),
|
|
||||||
tableView.trailingAnchor.constraint(equalTo: view.trailingAnchor),
|
|
||||||
tableView.bottomAnchor.constraint(equalTo: view.bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
tableView.delegate = self
|
tableView.delegate = self
|
||||||
viewModel.setupDiffableDataSource(
|
viewModel.setupDiffableDataSource(
|
||||||
|
|
|
@ -61,12 +61,7 @@ extension FavoritedByViewController {
|
||||||
|
|
||||||
tableView.translatesAutoresizingMaskIntoConstraints = false
|
tableView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
view.addSubview(tableView)
|
view.addSubview(tableView)
|
||||||
NSLayoutConstraint.activate([
|
tableView.pinToParent()
|
||||||
tableView.topAnchor.constraint(equalTo: view.topAnchor),
|
|
||||||
tableView.leadingAnchor.constraint(equalTo: view.leadingAnchor),
|
|
||||||
tableView.trailingAnchor.constraint(equalTo: view.trailingAnchor),
|
|
||||||
tableView.bottomAnchor.constraint(equalTo: view.bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
tableView.delegate = self
|
tableView.delegate = self
|
||||||
viewModel.setupDiffableDataSource(
|
viewModel.setupDiffableDataSource(
|
||||||
|
|
|
@ -61,12 +61,7 @@ extension RebloggedByViewController {
|
||||||
|
|
||||||
tableView.translatesAutoresizingMaskIntoConstraints = false
|
tableView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
view.addSubview(tableView)
|
view.addSubview(tableView)
|
||||||
NSLayoutConstraint.activate([
|
tableView.pinToParent()
|
||||||
tableView.topAnchor.constraint(equalTo: view.topAnchor),
|
|
||||||
tableView.leadingAnchor.constraint(equalTo: view.leadingAnchor),
|
|
||||||
tableView.trailingAnchor.constraint(equalTo: view.trailingAnchor),
|
|
||||||
tableView.bottomAnchor.constraint(equalTo: view.bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
tableView.delegate = self
|
tableView.delegate = self
|
||||||
viewModel.setupDiffableDataSource(
|
viewModel.setupDiffableDataSource(
|
||||||
|
|
|
@ -61,12 +61,7 @@ extension ReportViewController {
|
||||||
reportReasonViewController.view.translatesAutoresizingMaskIntoConstraints = false
|
reportReasonViewController.view.translatesAutoresizingMaskIntoConstraints = false
|
||||||
view.addSubview(reportReasonViewController.view)
|
view.addSubview(reportReasonViewController.view)
|
||||||
reportReasonViewController.didMove(toParent: self)
|
reportReasonViewController.didMove(toParent: self)
|
||||||
NSLayoutConstraint.activate([
|
reportReasonViewController.view.pinToParent()
|
||||||
reportReasonViewController.view.topAnchor.constraint(equalTo: view.topAnchor),
|
|
||||||
reportReasonViewController.view.leadingAnchor.constraint(equalTo: view.leadingAnchor),
|
|
||||||
reportReasonViewController.view.trailingAnchor.constraint(equalTo: view.trailingAnchor),
|
|
||||||
reportReasonViewController.view.bottomAnchor.constraint(equalTo: view.bottomAnchor),
|
|
||||||
])
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,12 +57,7 @@ extension ReportReasonViewController {
|
||||||
addChild(hostingViewController)
|
addChild(hostingViewController)
|
||||||
hostingViewController.view.translatesAutoresizingMaskIntoConstraints = false
|
hostingViewController.view.translatesAutoresizingMaskIntoConstraints = false
|
||||||
view.addSubview(hostingViewController.view)
|
view.addSubview(hostingViewController.view)
|
||||||
NSLayoutConstraint.activate([
|
hostingViewController.view.pinToParent()
|
||||||
hostingViewController.view.topAnchor.constraint(equalTo: view.topAnchor),
|
|
||||||
hostingViewController.view.leadingAnchor.constraint(equalTo: view.leadingAnchor),
|
|
||||||
hostingViewController.view.trailingAnchor.constraint(equalTo: view.trailingAnchor),
|
|
||||||
hostingViewController.view.bottomAnchor.constraint(equalTo: view.bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
navigationActionView.translatesAutoresizingMaskIntoConstraints = false
|
navigationActionView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
view.addSubview(navigationActionView)
|
view.addSubview(navigationActionView)
|
||||||
|
|
|
@ -60,12 +60,7 @@ extension ReportResultViewController {
|
||||||
addChild(hostingViewController)
|
addChild(hostingViewController)
|
||||||
hostingViewController.view.translatesAutoresizingMaskIntoConstraints = false
|
hostingViewController.view.translatesAutoresizingMaskIntoConstraints = false
|
||||||
view.addSubview(hostingViewController.view)
|
view.addSubview(hostingViewController.view)
|
||||||
NSLayoutConstraint.activate([
|
hostingViewController.view.pinToParent()
|
||||||
hostingViewController.view.topAnchor.constraint(equalTo: view.topAnchor),
|
|
||||||
hostingViewController.view.leadingAnchor.constraint(equalTo: view.leadingAnchor),
|
|
||||||
hostingViewController.view.trailingAnchor.constraint(equalTo: view.trailingAnchor),
|
|
||||||
hostingViewController.view.bottomAnchor.constraint(equalTo: view.bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
navigationActionView.translatesAutoresizingMaskIntoConstraints = false
|
navigationActionView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
view.addSubview(navigationActionView)
|
view.addSubview(navigationActionView)
|
||||||
|
|
|
@ -63,12 +63,7 @@ extension ReportServerRulesViewController {
|
||||||
addChild(hostingViewController)
|
addChild(hostingViewController)
|
||||||
hostingViewController.view.translatesAutoresizingMaskIntoConstraints = false
|
hostingViewController.view.translatesAutoresizingMaskIntoConstraints = false
|
||||||
view.addSubview(hostingViewController.view)
|
view.addSubview(hostingViewController.view)
|
||||||
NSLayoutConstraint.activate([
|
hostingViewController.view.pinToParent()
|
||||||
hostingViewController.view.topAnchor.constraint(equalTo: view.topAnchor),
|
|
||||||
hostingViewController.view.leadingAnchor.constraint(equalTo: view.leadingAnchor),
|
|
||||||
hostingViewController.view.trailingAnchor.constraint(equalTo: view.trailingAnchor),
|
|
||||||
hostingViewController.view.bottomAnchor.constraint(equalTo: view.bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
navigationActionView.translatesAutoresizingMaskIntoConstraints = false
|
navigationActionView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
view.addSubview(navigationActionView)
|
view.addSubview(navigationActionView)
|
||||||
|
|
|
@ -80,12 +80,7 @@ extension ReportStatusViewController {
|
||||||
|
|
||||||
tableView.translatesAutoresizingMaskIntoConstraints = false
|
tableView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
view.addSubview(tableView)
|
view.addSubview(tableView)
|
||||||
NSLayoutConstraint.activate([
|
tableView.pinToParent()
|
||||||
tableView.topAnchor.constraint(equalTo: view.topAnchor),
|
|
||||||
tableView.leadingAnchor.constraint(equalTo: view.leadingAnchor),
|
|
||||||
tableView.trailingAnchor.constraint(equalTo: view.trailingAnchor),
|
|
||||||
tableView.bottomAnchor.constraint(equalTo: view.bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
tableView.delegate = self
|
tableView.delegate = self
|
||||||
viewModel.setupDiffableDataSource(
|
viewModel.setupDiffableDataSource(
|
||||||
|
|
|
@ -93,12 +93,7 @@ extension ReportSupplementaryViewController {
|
||||||
|
|
||||||
tableView.translatesAutoresizingMaskIntoConstraints = false
|
tableView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
view.addSubview(tableView)
|
view.addSubview(tableView)
|
||||||
NSLayoutConstraint.activate([
|
tableView.pinToParent()
|
||||||
tableView.topAnchor.constraint(equalTo: view.topAnchor),
|
|
||||||
tableView.leadingAnchor.constraint(equalTo: view.leadingAnchor),
|
|
||||||
tableView.trailingAnchor.constraint(equalTo: view.trailingAnchor),
|
|
||||||
tableView.bottomAnchor.constraint(equalTo: view.bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
tableView.delegate = self
|
tableView.delegate = self
|
||||||
viewModel.setupDiffableDataSource(
|
viewModel.setupDiffableDataSource(
|
||||||
|
|
|
@ -74,11 +74,8 @@ extension ReportCommentTableViewCell {
|
||||||
|
|
||||||
commentTextView.translatesAutoresizingMaskIntoConstraints = false
|
commentTextView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
commentTextViewShadowBackgroundContainer.addSubview(commentTextView)
|
commentTextViewShadowBackgroundContainer.addSubview(commentTextView)
|
||||||
|
commentTextView.pinToParent()
|
||||||
NSLayoutConstraint.activate([
|
NSLayoutConstraint.activate([
|
||||||
commentTextView.topAnchor.constraint(equalTo: commentTextViewShadowBackgroundContainer.topAnchor),
|
|
||||||
commentTextView.leadingAnchor.constraint(equalTo: commentTextViewShadowBackgroundContainer.leadingAnchor),
|
|
||||||
commentTextView.trailingAnchor.constraint(equalTo: commentTextViewShadowBackgroundContainer.trailingAnchor),
|
|
||||||
commentTextView.bottomAnchor.constraint(equalTo: commentTextViewShadowBackgroundContainer.bottomAnchor),
|
|
||||||
commentTextView.heightAnchor.constraint(greaterThanOrEqualToConstant: 100).priority(.defaultHigh),
|
commentTextView.heightAnchor.constraint(greaterThanOrEqualToConstant: 100).priority(.defaultHigh),
|
||||||
])
|
])
|
||||||
}
|
}
|
||||||
|
|
|
@ -103,12 +103,7 @@ extension ReportResultActionTableViewCell {
|
||||||
|
|
||||||
reportBannerLabel.translatesAutoresizingMaskIntoConstraints = false
|
reportBannerLabel.translatesAutoresizingMaskIntoConstraints = false
|
||||||
reportBannerShadowContainer.addSubview(reportBannerLabel)
|
reportBannerShadowContainer.addSubview(reportBannerLabel)
|
||||||
NSLayoutConstraint.activate([
|
reportBannerLabel.pinToParent()
|
||||||
reportBannerLabel.topAnchor.constraint(equalTo: reportBannerShadowContainer.topAnchor),
|
|
||||||
reportBannerLabel.leadingAnchor.constraint(equalTo: reportBannerShadowContainer.leadingAnchor),
|
|
||||||
reportBannerLabel.trailingAnchor.constraint(equalTo: reportBannerShadowContainer.trailingAnchor),
|
|
||||||
reportBannerLabel.bottomAnchor.constraint(equalTo: reportBannerShadowContainer.bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -442,12 +442,7 @@ extension MainTabBarController {
|
||||||
|
|
||||||
composeButton.translatesAutoresizingMaskIntoConstraints = false
|
composeButton.translatesAutoresizingMaskIntoConstraints = false
|
||||||
composeButttonShadowBackgroundContainer.addSubview(composeButton)
|
composeButttonShadowBackgroundContainer.addSubview(composeButton)
|
||||||
NSLayoutConstraint.activate([
|
composeButton.pinToParent()
|
||||||
composeButton.topAnchor.constraint(equalTo: composeButttonShadowBackgroundContainer.topAnchor),
|
|
||||||
composeButton.leadingAnchor.constraint(equalTo: composeButttonShadowBackgroundContainer.leadingAnchor),
|
|
||||||
composeButton.trailingAnchor.constraint(equalTo: composeButttonShadowBackgroundContainer.trailingAnchor),
|
|
||||||
composeButton.bottomAnchor.constraint(equalTo: composeButttonShadowBackgroundContainer.bottomAnchor),
|
|
||||||
])
|
|
||||||
composeButton.setContentHuggingPriority(.required - 1, for: .horizontal)
|
composeButton.setContentHuggingPriority(.required - 1, for: .horizontal)
|
||||||
composeButton.setContentHuggingPriority(.required - 1, for: .vertical)
|
composeButton.setContentHuggingPriority(.required - 1, for: .vertical)
|
||||||
}
|
}
|
||||||
|
|
|
@ -101,12 +101,7 @@ extension SidebarViewController {
|
||||||
|
|
||||||
collectionView.translatesAutoresizingMaskIntoConstraints = false
|
collectionView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
view.addSubview(collectionView)
|
view.addSubview(collectionView)
|
||||||
NSLayoutConstraint.activate([
|
collectionView.pinToParent()
|
||||||
collectionView.topAnchor.constraint(equalTo: view.topAnchor),
|
|
||||||
collectionView.leadingAnchor.constraint(equalTo: view.leadingAnchor),
|
|
||||||
collectionView.trailingAnchor.constraint(equalTo: view.trailingAnchor),
|
|
||||||
collectionView.bottomAnchor.constraint(equalTo: view.bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
secondaryCollectionView.translatesAutoresizingMaskIntoConstraints = false
|
secondaryCollectionView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
view.addSubview(secondaryCollectionView)
|
view.addSubview(secondaryCollectionView)
|
||||||
|
|
|
@ -48,12 +48,7 @@ extension TrendCollectionViewCell {
|
||||||
|
|
||||||
trendView.translatesAutoresizingMaskIntoConstraints = false
|
trendView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
contentView.addSubview(trendView)
|
contentView.addSubview(trendView)
|
||||||
NSLayoutConstraint.activate([
|
trendView.pinToParent()
|
||||||
trendView.topAnchor.constraint(equalTo: contentView.topAnchor),
|
|
||||||
trendView.leadingAnchor.constraint(equalTo: contentView.leadingAnchor),
|
|
||||||
trendView.trailingAnchor.constraint(equalTo: contentView.trailingAnchor),
|
|
||||||
trendView.bottomAnchor.constraint(equalTo: contentView.bottomAnchor),
|
|
||||||
])
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override func updateConfiguration(using state: UICellConfigurationState) {
|
override func updateConfiguration(using state: UICellConfigurationState) {
|
||||||
|
|
|
@ -105,12 +105,7 @@ extension SearchViewController {
|
||||||
addChild(discoveryViewController)
|
addChild(discoveryViewController)
|
||||||
discoveryViewController.view.translatesAutoresizingMaskIntoConstraints = false
|
discoveryViewController.view.translatesAutoresizingMaskIntoConstraints = false
|
||||||
view.addSubview(discoveryViewController.view)
|
view.addSubview(discoveryViewController.view)
|
||||||
NSLayoutConstraint.activate([
|
discoveryViewController.view.pinToParent()
|
||||||
discoveryViewController.view.topAnchor.constraint(equalTo: view.topAnchor),
|
|
||||||
discoveryViewController.view.leadingAnchor.constraint(equalTo: view.leadingAnchor),
|
|
||||||
discoveryViewController.view.trailingAnchor.constraint(equalTo: view.trailingAnchor),
|
|
||||||
discoveryViewController.view.bottomAnchor.constraint(equalTo: view.bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
// discoveryViewController.view.isHidden = true
|
// discoveryViewController.view.isHidden = true
|
||||||
|
|
||||||
|
@ -151,12 +146,7 @@ extension SearchViewController {
|
||||||
searchBar.delegate = self
|
searchBar.delegate = self
|
||||||
searchBar.translatesAutoresizingMaskIntoConstraints = false
|
searchBar.translatesAutoresizingMaskIntoConstraints = false
|
||||||
titleViewContainer.addSubview(searchBar)
|
titleViewContainer.addSubview(searchBar)
|
||||||
NSLayoutConstraint.activate([
|
searchBar.pinToParent()
|
||||||
searchBar.topAnchor.constraint(equalTo: titleViewContainer.topAnchor),
|
|
||||||
searchBar.leadingAnchor.constraint(equalTo: titleViewContainer.leadingAnchor),
|
|
||||||
searchBar.trailingAnchor.constraint(equalTo: titleViewContainer.trailingAnchor),
|
|
||||||
searchBar.bottomAnchor.constraint(equalTo: titleViewContainer.bottomAnchor),
|
|
||||||
])
|
|
||||||
searchBar.setContentHuggingPriority(.required, for: .horizontal)
|
searchBar.setContentHuggingPriority(.required, for: .horizontal)
|
||||||
searchBar.setContentHuggingPriority(.required, for: .vertical)
|
searchBar.setContentHuggingPriority(.required, for: .vertical)
|
||||||
navigationItem.titleView = titleViewContainer
|
navigationItem.titleView = titleViewContainer
|
||||||
|
|
|
@ -62,12 +62,7 @@ extension SearchRecommendCollectionHeader {
|
||||||
containerStackView.isLayoutMarginsRelativeArrangement = true
|
containerStackView.isLayoutMarginsRelativeArrangement = true
|
||||||
containerStackView.translatesAutoresizingMaskIntoConstraints = false
|
containerStackView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
addSubview(containerStackView)
|
addSubview(containerStackView)
|
||||||
NSLayoutConstraint.activate([
|
containerStackView.pinToParent()
|
||||||
containerStackView.topAnchor.constraint(equalTo: topAnchor),
|
|
||||||
containerStackView.leadingAnchor.constraint(equalTo: leadingAnchor),
|
|
||||||
containerStackView.bottomAnchor.constraint(equalTo: bottomAnchor),
|
|
||||||
containerStackView.trailingAnchor.constraint(equalTo: trailingAnchor)
|
|
||||||
])
|
|
||||||
|
|
||||||
let horizontalStackView = UIStackView()
|
let horizontalStackView = UIStackView()
|
||||||
horizontalStackView.spacing = 8
|
horizontalStackView.spacing = 8
|
||||||
|
|
|
@ -116,12 +116,7 @@ extension SearchDetailViewController {
|
||||||
searchHistoryViewController.view.bottomAnchor.constraint(equalTo: view.bottomAnchor),
|
searchHistoryViewController.view.bottomAnchor.constraint(equalTo: view.bottomAnchor),
|
||||||
])
|
])
|
||||||
} else {
|
} else {
|
||||||
NSLayoutConstraint.activate([
|
searchHistoryViewController.view.pinToParent()
|
||||||
searchHistoryViewController.view.topAnchor.constraint(equalTo: view.topAnchor),
|
|
||||||
searchHistoryViewController.view.leadingAnchor.constraint(equalTo: view.leadingAnchor),
|
|
||||||
searchHistoryViewController.view.trailingAnchor.constraint(equalTo: view.trailingAnchor),
|
|
||||||
searchHistoryViewController.view.bottomAnchor.constraint(equalTo: view.bottomAnchor),
|
|
||||||
])
|
|
||||||
}
|
}
|
||||||
|
|
||||||
transition = Transition(style: .fade, duration: 0.1)
|
transition = Transition(style: .fade, duration: 0.1)
|
||||||
|
@ -289,12 +284,7 @@ extension SearchDetailViewController {
|
||||||
|
|
||||||
navigationBarVisualEffectBackgroundView.translatesAutoresizingMaskIntoConstraints = false
|
navigationBarVisualEffectBackgroundView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
view.insertSubview(navigationBarVisualEffectBackgroundView, belowSubview: navigationBarBackgroundView)
|
view.insertSubview(navigationBarVisualEffectBackgroundView, belowSubview: navigationBarBackgroundView)
|
||||||
NSLayoutConstraint.activate([
|
navigationBarVisualEffectBackgroundView.pinTo(to: navigationBarBackgroundView)
|
||||||
navigationBarVisualEffectBackgroundView.topAnchor.constraint(equalTo: navigationBarBackgroundView.topAnchor),
|
|
||||||
navigationBarVisualEffectBackgroundView.leadingAnchor.constraint(equalTo: navigationBarBackgroundView.leadingAnchor),
|
|
||||||
navigationBarVisualEffectBackgroundView.trailingAnchor.constraint(equalTo: navigationBarBackgroundView.trailingAnchor),
|
|
||||||
navigationBarVisualEffectBackgroundView.bottomAnchor.constraint(equalTo: navigationBarBackgroundView.bottomAnchor),
|
|
||||||
])
|
|
||||||
} else {
|
} else {
|
||||||
navigationItem.setHidesBackButton(true, animated: false)
|
navigationItem.setHidesBackButton(true, animated: false)
|
||||||
navigationItem.titleView = nil
|
navigationItem.titleView = nil
|
||||||
|
|
|
@ -47,12 +47,7 @@ extension SearchHistoryViewController {
|
||||||
|
|
||||||
collectionView.translatesAutoresizingMaskIntoConstraints = false
|
collectionView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
view.addSubview(collectionView)
|
view.addSubview(collectionView)
|
||||||
NSLayoutConstraint.activate([
|
collectionView.pinToParent()
|
||||||
collectionView.topAnchor.constraint(equalTo: view.topAnchor),
|
|
||||||
collectionView.leadingAnchor.constraint(equalTo: view.leadingAnchor),
|
|
||||||
collectionView.trailingAnchor.constraint(equalTo: view.trailingAnchor),
|
|
||||||
collectionView.bottomAnchor.constraint(equalTo: view.bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
collectionView.delegate = self
|
collectionView.delegate = self
|
||||||
viewModel.setupDiffableDataSource(
|
viewModel.setupDiffableDataSource(
|
||||||
|
|
|
@ -49,12 +49,7 @@ extension SearchResultViewController {
|
||||||
|
|
||||||
tableView.translatesAutoresizingMaskIntoConstraints = false
|
tableView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
view.addSubview(tableView)
|
view.addSubview(tableView)
|
||||||
NSLayoutConstraint.activate([
|
tableView.pinToParent()
|
||||||
tableView.topAnchor.constraint(equalTo: view.topAnchor),
|
|
||||||
tableView.leadingAnchor.constraint(equalTo: view.leadingAnchor),
|
|
||||||
tableView.trailingAnchor.constraint(equalTo: view.trailingAnchor),
|
|
||||||
tableView.bottomAnchor.constraint(equalTo: view.bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
tableView.delegate = self
|
tableView.delegate = self
|
||||||
// tableView.prefetchDataSource = self
|
// tableView.prefetchDataSource = self
|
||||||
|
|
|
@ -101,12 +101,7 @@ extension SettingsAppearanceTableViewCell {
|
||||||
|
|
||||||
stackView.translatesAutoresizingMaskIntoConstraints = false
|
stackView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
contentView.addSubview(stackView)
|
contentView.addSubview(stackView)
|
||||||
NSLayoutConstraint.activate([
|
stackView.pinToParent()
|
||||||
stackView.topAnchor.constraint(equalTo: contentView.topAnchor),
|
|
||||||
stackView.leadingAnchor.constraint(equalTo: contentView.leadingAnchor),
|
|
||||||
stackView.bottomAnchor.constraint(equalTo: contentView.bottomAnchor),
|
|
||||||
stackView.trailingAnchor.constraint(equalTo: contentView.trailingAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
stackView.addArrangedSubview(systemAppearanceView)
|
stackView.addArrangedSubview(systemAppearanceView)
|
||||||
stackView.addArrangedSubview(darkAppearanceView)
|
stackView.addArrangedSubview(darkAppearanceView)
|
||||||
|
|
|
@ -225,12 +225,7 @@ extension SettingsViewController {
|
||||||
|
|
||||||
setupNavigation()
|
setupNavigation()
|
||||||
view.addSubview(tableView)
|
view.addSubview(tableView)
|
||||||
NSLayoutConstraint.activate([
|
tableView.pinToParent()
|
||||||
tableView.topAnchor.constraint(equalTo: view.topAnchor),
|
|
||||||
tableView.leadingAnchor.constraint(equalTo: view.leadingAnchor),
|
|
||||||
tableView.trailingAnchor.constraint(equalTo: view.trailingAnchor),
|
|
||||||
tableView.bottomAnchor.constraint(equalTo: view.bottomAnchor),
|
|
||||||
])
|
|
||||||
setupTableView()
|
setupTableView()
|
||||||
|
|
||||||
updateSectionHeaderStackViewLayout()
|
updateSectionHeaderStackViewLayout()
|
||||||
|
|
|
@ -85,12 +85,7 @@ extension AppearanceView {
|
||||||
private func setupUI() {
|
private func setupUI() {
|
||||||
imageView.translatesAutoresizingMaskIntoConstraints = false
|
imageView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
imageViewShadowBackgroundContainer.addSubview(imageView)
|
imageViewShadowBackgroundContainer.addSubview(imageView)
|
||||||
NSLayoutConstraint.activate([
|
imageView.pinToParent()
|
||||||
imageView.topAnchor.constraint(equalTo: imageViewShadowBackgroundContainer.topAnchor),
|
|
||||||
imageView.leadingAnchor.constraint(equalTo: imageViewShadowBackgroundContainer.leadingAnchor),
|
|
||||||
imageView.trailingAnchor.constraint(equalTo: imageViewShadowBackgroundContainer.trailingAnchor),
|
|
||||||
imageView.bottomAnchor.constraint(equalTo: imageViewShadowBackgroundContainer.bottomAnchor),
|
|
||||||
])
|
|
||||||
imageViewShadowBackgroundContainer.cornerRadius = 4
|
imageViewShadowBackgroundContainer.cornerRadius = 4
|
||||||
|
|
||||||
stackView.addArrangedSubview(imageViewShadowBackgroundContainer)
|
stackView.addArrangedSubview(imageViewShadowBackgroundContainer)
|
||||||
|
@ -100,11 +95,8 @@ extension AppearanceView {
|
||||||
addSubview(stackView)
|
addSubview(stackView)
|
||||||
translatesAutoresizingMaskIntoConstraints = false
|
translatesAutoresizingMaskIntoConstraints = false
|
||||||
stackView.translatesAutoresizingMaskIntoConstraints = false
|
stackView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
|
stackView.pinToParent()
|
||||||
NSLayoutConstraint.activate([
|
NSLayoutConstraint.activate([
|
||||||
stackView.topAnchor.constraint(equalTo: self.topAnchor),
|
|
||||||
stackView.leadingAnchor.constraint(equalTo: self.leadingAnchor),
|
|
||||||
stackView.bottomAnchor.constraint(equalTo: self.bottomAnchor),
|
|
||||||
stackView.trailingAnchor.constraint(equalTo: self.trailingAnchor),
|
|
||||||
imageView.heightAnchor.constraint(equalTo: imageView.widthAnchor, multiplier: 121.0 / 100.0), // height / width
|
imageView.heightAnchor.constraint(equalTo: imageView.widthAnchor, multiplier: 121.0 / 100.0), // height / width
|
||||||
])
|
])
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,12 +31,7 @@ extension ContextMenuImagePreviewViewController {
|
||||||
|
|
||||||
imageView.translatesAutoresizingMaskIntoConstraints = false
|
imageView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
view.addSubview(imageView)
|
view.addSubview(imageView)
|
||||||
NSLayoutConstraint.activate([
|
imageView.pinToParent()
|
||||||
imageView.topAnchor.constraint(equalTo: view.topAnchor),
|
|
||||||
imageView.leadingAnchor.constraint(equalTo: view.leadingAnchor),
|
|
||||||
imageView.trailingAnchor.constraint(equalTo: view.trailingAnchor),
|
|
||||||
imageView.bottomAnchor.constraint(equalTo: view.bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
imageView.image = viewModel.thumbnail
|
imageView.image = viewModel.thumbnail
|
||||||
|
|
||||||
|
|
|
@ -93,12 +93,7 @@ extension ContentWarningOverlayView {
|
||||||
|
|
||||||
vibrancyVisualEffectView.translatesAutoresizingMaskIntoConstraints = false
|
vibrancyVisualEffectView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
blurVisualEffectView.contentView.addSubview(vibrancyVisualEffectView)
|
blurVisualEffectView.contentView.addSubview(vibrancyVisualEffectView)
|
||||||
NSLayoutConstraint.activate([
|
vibrancyVisualEffectView.pinTo(to: blurVisualEffectView)
|
||||||
vibrancyVisualEffectView.topAnchor.constraint(equalTo: blurVisualEffectView.topAnchor),
|
|
||||||
vibrancyVisualEffectView.leadingAnchor.constraint(equalTo: blurVisualEffectView.leadingAnchor),
|
|
||||||
vibrancyVisualEffectView.trailingAnchor.constraint(equalTo: blurVisualEffectView.trailingAnchor),
|
|
||||||
vibrancyVisualEffectView.bottomAnchor.constraint(equalTo: blurVisualEffectView.bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
vibrancyContentWarningLabel.translatesAutoresizingMaskIntoConstraints = false
|
vibrancyContentWarningLabel.translatesAutoresizingMaskIntoConstraints = false
|
||||||
vibrancyVisualEffectView.contentView.addSubview(vibrancyContentWarningLabel)
|
vibrancyVisualEffectView.contentView.addSubview(vibrancyContentWarningLabel)
|
||||||
|
@ -110,12 +105,7 @@ extension ContentWarningOverlayView {
|
||||||
|
|
||||||
blurVisualEffectView.translatesAutoresizingMaskIntoConstraints = false
|
blurVisualEffectView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
addSubview(blurVisualEffectView)
|
addSubview(blurVisualEffectView)
|
||||||
NSLayoutConstraint.activate([
|
blurVisualEffectView.pinToParent()
|
||||||
blurVisualEffectView.topAnchor.constraint(equalTo: topAnchor),
|
|
||||||
blurVisualEffectView.leadingAnchor.constraint(equalTo: leadingAnchor),
|
|
||||||
blurVisualEffectView.trailingAnchor.constraint(equalTo: trailingAnchor),
|
|
||||||
blurVisualEffectView.bottomAnchor.constraint(equalTo: bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
// blur image style
|
// blur image style
|
||||||
contentOverlayView.translatesAutoresizingMaskIntoConstraints = false
|
contentOverlayView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
|
@ -134,12 +124,7 @@ extension ContentWarningOverlayView {
|
||||||
|
|
||||||
blurContentWarningLabelContainer.translatesAutoresizingMaskIntoConstraints = false
|
blurContentWarningLabelContainer.translatesAutoresizingMaskIntoConstraints = false
|
||||||
contentOverlayView.addSubview(blurContentWarningLabelContainer)
|
contentOverlayView.addSubview(blurContentWarningLabelContainer)
|
||||||
NSLayoutConstraint.activate([
|
blurContentWarningLabelContainer.pinTo(to: self)
|
||||||
blurContentWarningLabelContainer.topAnchor.constraint(equalTo: topAnchor),
|
|
||||||
blurContentWarningLabelContainer.leadingAnchor.constraint(equalTo: leadingAnchor),
|
|
||||||
blurContentWarningLabelContainer.trailingAnchor.constraint(equalTo: trailingAnchor),
|
|
||||||
blurContentWarningLabelContainer.bottomAnchor.constraint(equalTo: bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
let topPaddingView = UIView()
|
let topPaddingView = UIView()
|
||||||
let bottomPaddingView = UIView()
|
let bottomPaddingView = UIView()
|
||||||
|
|
|
@ -47,12 +47,7 @@ extension DoubleTitleLabelNavigationBarTitleView {
|
||||||
containerView.distribution = .fill
|
containerView.distribution = .fill
|
||||||
containerView.translatesAutoresizingMaskIntoConstraints = false
|
containerView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
addSubview(containerView)
|
addSubview(containerView)
|
||||||
NSLayoutConstraint.activate([
|
containerView.pinToParent()
|
||||||
containerView.topAnchor.constraint(equalTo: topAnchor),
|
|
||||||
containerView.leadingAnchor.constraint(equalTo: leadingAnchor),
|
|
||||||
containerView.trailingAnchor.constraint(equalTo: trailingAnchor),
|
|
||||||
containerView.bottomAnchor.constraint(equalTo: bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
containerView.addArrangedSubview(titleLabel)
|
containerView.addArrangedSubview(titleLabel)
|
||||||
containerView.addArrangedSubview(subtitleLabel)
|
containerView.addArrangedSubview(subtitleLabel)
|
||||||
|
|
|
@ -49,12 +49,7 @@ extension WebViewController {
|
||||||
|
|
||||||
webView.translatesAutoresizingMaskIntoConstraints = false
|
webView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
view.addSubview(webView)
|
view.addSubview(webView)
|
||||||
NSLayoutConstraint.activate([
|
webView.pinToParent()
|
||||||
webView.topAnchor.constraint(equalTo: view.topAnchor),
|
|
||||||
webView.leadingAnchor.constraint(equalTo: view.leadingAnchor),
|
|
||||||
webView.trailingAnchor.constraint(equalTo: view.trailingAnchor),
|
|
||||||
webView.bottomAnchor.constraint(equalTo: view.bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
let request = URLRequest(url: viewModel.url)
|
let request = URLRequest(url: viewModel.url)
|
||||||
webView.load(request)
|
webView.load(request)
|
||||||
|
|
|
@ -53,11 +53,6 @@ extension SuggestionAccountCollectionViewCell {
|
||||||
private func configure() {
|
private func configure() {
|
||||||
contentView.addSubview(imageView)
|
contentView.addSubview(imageView)
|
||||||
imageView.translatesAutoresizingMaskIntoConstraints = false
|
imageView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
NSLayoutConstraint.activate([
|
imageView.pinToParent()
|
||||||
imageView.topAnchor.constraint(equalTo: contentView.topAnchor),
|
|
||||||
imageView.leadingAnchor.constraint(equalTo: contentView.leadingAnchor),
|
|
||||||
imageView.trailingAnchor.constraint(equalTo: contentView.trailingAnchor),
|
|
||||||
imageView.bottomAnchor.constraint(equalTo: contentView.bottomAnchor),
|
|
||||||
])
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -97,12 +97,7 @@ extension SuggestionAccountTableViewCell {
|
||||||
containerStackView.isLayoutMarginsRelativeArrangement = true
|
containerStackView.isLayoutMarginsRelativeArrangement = true
|
||||||
containerStackView.translatesAutoresizingMaskIntoConstraints = false
|
containerStackView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
contentView.addSubview(containerStackView)
|
contentView.addSubview(containerStackView)
|
||||||
NSLayoutConstraint.activate([
|
containerStackView.pinToParent()
|
||||||
containerStackView.topAnchor.constraint(equalTo: contentView.topAnchor),
|
|
||||||
containerStackView.leadingAnchor.constraint(equalTo: contentView.leadingAnchor),
|
|
||||||
containerStackView.trailingAnchor.constraint(equalTo: contentView.trailingAnchor),
|
|
||||||
containerStackView.bottomAnchor.constraint(equalTo: contentView.bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
avatarButton.translatesAutoresizingMaskIntoConstraints = false
|
avatarButton.translatesAutoresizingMaskIntoConstraints = false
|
||||||
containerStackView.addArrangedSubview(avatarButton)
|
containerStackView.addArrangedSubview(avatarButton)
|
||||||
|
|
|
@ -87,12 +87,7 @@ extension ThreadViewController {
|
||||||
|
|
||||||
tableView.translatesAutoresizingMaskIntoConstraints = false
|
tableView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
view.addSubview(tableView)
|
view.addSubview(tableView)
|
||||||
NSLayoutConstraint.activate([
|
tableView.pinToParent()
|
||||||
tableView.topAnchor.constraint(equalTo: view.topAnchor),
|
|
||||||
tableView.leadingAnchor.constraint(equalTo: view.leadingAnchor),
|
|
||||||
tableView.trailingAnchor.constraint(equalTo: view.trailingAnchor),
|
|
||||||
tableView.bottomAnchor.constraint(equalTo: view.bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
tableView.delegate = self
|
tableView.delegate = self
|
||||||
viewModel.setupDiffableDataSource(
|
viewModel.setupDiffableDataSource(
|
||||||
|
|
|
@ -46,3 +46,20 @@ extension UIView {
|
||||||
return self
|
return self
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public extension UIView {
|
||||||
|
|
||||||
|
func pinToParent() {
|
||||||
|
pinTo(to: self.superview)
|
||||||
|
}
|
||||||
|
|
||||||
|
func pinTo(to view: UIView?) {
|
||||||
|
guard let pinToView = view else { return }
|
||||||
|
NSLayoutConstraint.activate([
|
||||||
|
topAnchor.constraint(equalTo: pinToView.topAnchor),
|
||||||
|
leadingAnchor.constraint(equalTo: pinToView.leadingAnchor),
|
||||||
|
trailingAnchor.constraint(equalTo: pinToView.trailingAnchor),
|
||||||
|
bottomAnchor.constraint(equalTo: pinToView.bottomAnchor),
|
||||||
|
])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -80,12 +80,7 @@ extension AutoCompleteViewController {
|
||||||
|
|
||||||
tableView.translatesAutoresizingMaskIntoConstraints = false
|
tableView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
containerBackgroundView.addSubview(tableView)
|
containerBackgroundView.addSubview(tableView)
|
||||||
NSLayoutConstraint.activate([
|
tableView.pinToParent()
|
||||||
tableView.topAnchor.constraint(equalTo: containerBackgroundView.topAnchor),
|
|
||||||
tableView.leadingAnchor.constraint(equalTo: containerBackgroundView.leadingAnchor),
|
|
||||||
tableView.trailingAnchor.constraint(equalTo: containerBackgroundView.trailingAnchor),
|
|
||||||
tableView.bottomAnchor.constraint(equalTo: containerBackgroundView.bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
tableView.delegate = self
|
tableView.delegate = self
|
||||||
viewModel.setupDiffableDataSource(tableView: tableView)
|
viewModel.setupDiffableDataSource(tableView: tableView)
|
||||||
|
|
|
@ -65,12 +65,7 @@ extension AutoCompleteTopChevronView {
|
||||||
|
|
||||||
shadowView.translatesAutoresizingMaskIntoConstraints = false
|
shadowView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
addSubview(shadowView)
|
addSubview(shadowView)
|
||||||
NSLayoutConstraint.activate([
|
shadowView.pinToParent()
|
||||||
shadowView.topAnchor.constraint(equalTo: topAnchor),
|
|
||||||
shadowView.leadingAnchor.constraint(equalTo: leadingAnchor),
|
|
||||||
shadowView.trailingAnchor.constraint(equalTo: trailingAnchor),
|
|
||||||
shadowView.bottomAnchor.constraint(equalTo: bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
shadowLayer.fillColor = topViewBackgroundColor.cgColor
|
shadowLayer.fillColor = topViewBackgroundColor.cgColor
|
||||||
shadowView.layer.addSublayer(shadowLayer)
|
shadowView.layer.addSublayer(shadowLayer)
|
||||||
|
|
|
@ -108,12 +108,7 @@ extension ComposeContentViewController {
|
||||||
// setup tableView
|
// setup tableView
|
||||||
tableView.translatesAutoresizingMaskIntoConstraints = false
|
tableView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
view.addSubview(tableView)
|
view.addSubview(tableView)
|
||||||
NSLayoutConstraint.activate([
|
tableView.pinToParent()
|
||||||
tableView.topAnchor.constraint(equalTo: view.topAnchor),
|
|
||||||
tableView.leadingAnchor.constraint(equalTo: view.leadingAnchor),
|
|
||||||
tableView.trailingAnchor.constraint(equalTo: view.trailingAnchor),
|
|
||||||
tableView.bottomAnchor.constraint(equalTo: view.bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
tableView.delegate = self
|
tableView.delegate = self
|
||||||
viewModel.setupDataSource(tableView: tableView)
|
viewModel.setupDataSource(tableView: tableView)
|
||||||
|
|
|
@ -44,12 +44,7 @@ extension CustomEmojiPickerInputView {
|
||||||
|
|
||||||
collectionView.translatesAutoresizingMaskIntoConstraints = false
|
collectionView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
addSubview(collectionView)
|
addSubview(collectionView)
|
||||||
NSLayoutConstraint.activate([
|
collectionView.pinToParent()
|
||||||
collectionView.topAnchor.constraint(equalTo: topAnchor),
|
|
||||||
collectionView.leadingAnchor.constraint(equalTo: leadingAnchor),
|
|
||||||
collectionView.trailingAnchor.constraint(equalTo: trailingAnchor),
|
|
||||||
collectionView.bottomAnchor.constraint(equalTo: bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
activityIndicatorView.hidesWhenStopped = true
|
activityIndicatorView.hidesWhenStopped = true
|
||||||
activityIndicatorView.startAnimating()
|
activityIndicatorView.startAnimating()
|
||||||
|
|
|
@ -46,12 +46,7 @@ extension CustomEmojiPickerItemCollectionViewCell {
|
||||||
private func _init() {
|
private func _init() {
|
||||||
emojiImageView.translatesAutoresizingMaskIntoConstraints = false
|
emojiImageView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
contentView.addSubview(emojiImageView)
|
contentView.addSubview(emojiImageView)
|
||||||
NSLayoutConstraint.activate([
|
emojiImageView.pinToParent()
|
||||||
emojiImageView.topAnchor.constraint(equalTo: contentView.topAnchor),
|
|
||||||
emojiImageView.leadingAnchor.constraint(equalTo: contentView.leadingAnchor),
|
|
||||||
emojiImageView.trailingAnchor.constraint(equalTo: contentView.trailingAnchor),
|
|
||||||
emojiImageView.bottomAnchor.constraint(equalTo: contentView.bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
isAccessibilityElement = true
|
isAccessibilityElement = true
|
||||||
accessibilityTraits = .button
|
accessibilityTraits = .button
|
||||||
|
|
|
@ -37,12 +37,7 @@ final public class FLAnimatedImageViewProxy: UIView {
|
||||||
|
|
||||||
imageView.translatesAutoresizingMaskIntoConstraints = false
|
imageView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
addSubview(imageView)
|
addSubview(imageView)
|
||||||
NSLayoutConstraint.activate([
|
imageView.pinToParent()
|
||||||
imageView.topAnchor.constraint(equalTo: topAnchor),
|
|
||||||
imageView.leadingAnchor.constraint(equalTo: leadingAnchor),
|
|
||||||
imageView.trailingAnchor.constraint(equalTo: trailingAnchor),
|
|
||||||
imageView.bottomAnchor.constraint(equalTo: bottomAnchor),
|
|
||||||
])
|
|
||||||
}
|
}
|
||||||
|
|
||||||
required init?(coder: NSCoder) {
|
required init?(coder: NSCoder) {
|
||||||
|
|
|
@ -32,12 +32,7 @@ open class AvatarButton: UIControl {
|
||||||
avatarImageView.frame = bounds
|
avatarImageView.frame = bounds
|
||||||
avatarImageView.translatesAutoresizingMaskIntoConstraints = false
|
avatarImageView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
addSubview(avatarImageView)
|
addSubview(avatarImageView)
|
||||||
NSLayoutConstraint.activate([
|
avatarImageView.pinToParent()
|
||||||
avatarImageView.topAnchor.constraint(equalTo: topAnchor),
|
|
||||||
avatarImageView.leadingAnchor.constraint(equalTo: leadingAnchor),
|
|
||||||
avatarImageView.trailingAnchor.constraint(equalTo: trailingAnchor),
|
|
||||||
avatarImageView.bottomAnchor.constraint(equalTo: bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
isAccessibilityElement = true
|
isAccessibilityElement = true
|
||||||
accessibilityLabel = L10n.Common.Controls.Status.showUserProfile
|
accessibilityLabel = L10n.Common.Controls.Status.showUserProfile
|
||||||
|
|
|
@ -136,12 +136,7 @@ extension MediaGridContainerView {
|
||||||
private func layoutContentWarningOverlay() {
|
private func layoutContentWarningOverlay() {
|
||||||
contentWarningOverlay.translatesAutoresizingMaskIntoConstraints = false
|
contentWarningOverlay.translatesAutoresizingMaskIntoConstraints = false
|
||||||
addSubview(contentWarningOverlay)
|
addSubview(contentWarningOverlay)
|
||||||
NSLayoutConstraint.activate([
|
contentWarningOverlay.pinToParent()
|
||||||
contentWarningOverlay.topAnchor.constraint(equalTo: topAnchor),
|
|
||||||
contentWarningOverlay.leadingAnchor.constraint(equalTo: leadingAnchor),
|
|
||||||
contentWarningOverlay.trailingAnchor.constraint(equalTo: trailingAnchor),
|
|
||||||
contentWarningOverlay.bottomAnchor.constraint(equalTo: bottomAnchor),
|
|
||||||
])
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -208,12 +203,7 @@ extension MediaGridContainerView {
|
||||||
let containerVerticalStackView = createStackView(axis: .vertical)
|
let containerVerticalStackView = createStackView(axis: .vertical)
|
||||||
containerVerticalStackView.translatesAutoresizingMaskIntoConstraints = false
|
containerVerticalStackView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
view.addSubview(containerVerticalStackView)
|
view.addSubview(containerVerticalStackView)
|
||||||
NSLayoutConstraint.activate([
|
containerVerticalStackView.pinToParent()
|
||||||
containerVerticalStackView.topAnchor.constraint(equalTo: view.topAnchor),
|
|
||||||
containerVerticalStackView.leadingAnchor.constraint(equalTo: view.leadingAnchor),
|
|
||||||
containerVerticalStackView.trailingAnchor.constraint(equalTo: view.trailingAnchor),
|
|
||||||
containerVerticalStackView.bottomAnchor.constraint(equalTo: view.bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
let count = mediaViews.count
|
let count = mediaViews.count
|
||||||
switch count {
|
switch count {
|
||||||
|
|
|
@ -45,12 +45,7 @@ extension FamiliarFollowersDashboardView {
|
||||||
|
|
||||||
stackView.translatesAutoresizingMaskIntoConstraints = false
|
stackView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
addSubview(stackView)
|
addSubview(stackView)
|
||||||
NSLayoutConstraint.activate([
|
stackView.pinToParent()
|
||||||
stackView.topAnchor.constraint(equalTo: topAnchor),
|
|
||||||
stackView.leadingAnchor.constraint(equalTo: leadingAnchor),
|
|
||||||
stackView.trailingAnchor.constraint(equalTo: trailingAnchor),
|
|
||||||
stackView.bottomAnchor.constraint(equalTo: bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
avatarContainerView.translatesAutoresizingMaskIntoConstraints = false
|
avatarContainerView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
stackView.addArrangedSubview(avatarContainerView)
|
stackView.addArrangedSubview(avatarContainerView)
|
||||||
|
|
|
@ -138,12 +138,7 @@ extension MediaView {
|
||||||
private func layoutImage() {
|
private func layoutImage() {
|
||||||
imageView.translatesAutoresizingMaskIntoConstraints = false
|
imageView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
container.addSubview(imageView)
|
container.addSubview(imageView)
|
||||||
NSLayoutConstraint.activate([
|
imageView.pinToParent()
|
||||||
imageView.topAnchor.constraint(equalTo: container.topAnchor),
|
|
||||||
imageView.leadingAnchor.constraint(equalTo: container.leadingAnchor),
|
|
||||||
imageView.trailingAnchor.constraint(equalTo: container.trailingAnchor),
|
|
||||||
imageView.bottomAnchor.constraint(equalTo: container.bottomAnchor),
|
|
||||||
])
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private func bindImage(configuration: Configuration, info: Configuration.ImageInfo) {
|
private func bindImage(configuration: Configuration, info: Configuration.ImageInfo) {
|
||||||
|
@ -168,12 +163,7 @@ extension MediaView {
|
||||||
// use view controller as View here
|
// use view controller as View here
|
||||||
playerViewController.view.translatesAutoresizingMaskIntoConstraints = false
|
playerViewController.view.translatesAutoresizingMaskIntoConstraints = false
|
||||||
container.addSubview(playerViewController.view)
|
container.addSubview(playerViewController.view)
|
||||||
NSLayoutConstraint.activate([
|
playerViewController.view.pinToParent()
|
||||||
playerViewController.view.topAnchor.constraint(equalTo: container.topAnchor),
|
|
||||||
playerViewController.view.leadingAnchor.constraint(equalTo: container.leadingAnchor),
|
|
||||||
playerViewController.view.trailingAnchor.constraint(equalTo: container.trailingAnchor),
|
|
||||||
playerViewController.view.bottomAnchor.constraint(equalTo: container.bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
setupIndicatorViewHierarchy()
|
setupIndicatorViewHierarchy()
|
||||||
playerIndicatorLabel.attributedText = NSAttributedString(string: "GIF")
|
playerIndicatorLabel.attributedText = NSAttributedString(string: "GIF")
|
||||||
|
@ -213,12 +203,7 @@ extension MediaView {
|
||||||
private func layoutBlurhash() {
|
private func layoutBlurhash() {
|
||||||
blurhashImageView.translatesAutoresizingMaskIntoConstraints = false
|
blurhashImageView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
container.addSubview(blurhashImageView)
|
container.addSubview(blurhashImageView)
|
||||||
NSLayoutConstraint.activate([
|
blurhashImageView.pinToParent()
|
||||||
blurhashImageView.topAnchor.constraint(equalTo: container.topAnchor),
|
|
||||||
blurhashImageView.leadingAnchor.constraint(equalTo: container.leadingAnchor),
|
|
||||||
blurhashImageView.trailingAnchor.constraint(equalTo: container.trailingAnchor),
|
|
||||||
blurhashImageView.bottomAnchor.constraint(equalTo: container.bottomAnchor),
|
|
||||||
])
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private func bindBlurhash(configuration: Configuration) {
|
private func bindBlurhash(configuration: Configuration) {
|
||||||
|
@ -304,12 +289,7 @@ extension MediaView {
|
||||||
guard container.superview == nil else { return }
|
guard container.superview == nil else { return }
|
||||||
container.translatesAutoresizingMaskIntoConstraints = false
|
container.translatesAutoresizingMaskIntoConstraints = false
|
||||||
addSubview(container)
|
addSubview(container)
|
||||||
NSLayoutConstraint.activate([
|
container.pinToParent()
|
||||||
container.topAnchor.constraint(equalTo: topAnchor),
|
|
||||||
container.leadingAnchor.constraint(equalTo: leadingAnchor),
|
|
||||||
container.trailingAnchor.constraint(equalTo: trailingAnchor),
|
|
||||||
container.bottomAnchor.constraint(equalTo: bottomAnchor),
|
|
||||||
])
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private func setupIndicatorViewHierarchy() {
|
private func setupIndicatorViewHierarchy() {
|
||||||
|
@ -329,12 +309,7 @@ extension MediaView {
|
||||||
if vibrancyEffectView.superview == nil {
|
if vibrancyEffectView.superview == nil {
|
||||||
vibrancyEffectView.translatesAutoresizingMaskIntoConstraints = false
|
vibrancyEffectView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
blurEffectView.contentView.addSubview(vibrancyEffectView)
|
blurEffectView.contentView.addSubview(vibrancyEffectView)
|
||||||
NSLayoutConstraint.activate([
|
vibrancyEffectView.pinToParent()
|
||||||
vibrancyEffectView.topAnchor.constraint(equalTo: blurEffectView.contentView.topAnchor),
|
|
||||||
vibrancyEffectView.leadingAnchor.constraint(equalTo: blurEffectView.contentView.leadingAnchor),
|
|
||||||
vibrancyEffectView.trailingAnchor.constraint(equalTo: blurEffectView.contentView.trailingAnchor),
|
|
||||||
vibrancyEffectView.bottomAnchor.constraint(equalTo: blurEffectView.contentView.bottomAnchor),
|
|
||||||
])
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if playerIndicatorLabel.superview == nil {
|
if playerIndicatorLabel.superview == nil {
|
||||||
|
|
|
@ -79,12 +79,7 @@ extension NewsView {
|
||||||
container.spacing = 8
|
container.spacing = 8
|
||||||
container.translatesAutoresizingMaskIntoConstraints = false
|
container.translatesAutoresizingMaskIntoConstraints = false
|
||||||
addSubview(container)
|
addSubview(container)
|
||||||
NSLayoutConstraint.activate([
|
container.pinToParent()
|
||||||
container.topAnchor.constraint(equalTo: topAnchor),
|
|
||||||
container.leadingAnchor.constraint(equalTo: leadingAnchor),
|
|
||||||
container.trailingAnchor.constraint(equalTo: trailingAnchor),
|
|
||||||
container.bottomAnchor.constraint(equalTo: bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
// textContainer: V - [ providerContainer | headlineLabel | (spacer) | footnoteLabel ]
|
// textContainer: V - [ providerContainer | headlineLabel | (spacer) | footnoteLabel ]
|
||||||
let textContainer = UIStackView()
|
let textContainer = UIStackView()
|
||||||
|
|
|
@ -292,21 +292,11 @@ extension NotificationView {
|
||||||
|
|
||||||
acceptFollowRequestButton.translatesAutoresizingMaskIntoConstraints = false
|
acceptFollowRequestButton.translatesAutoresizingMaskIntoConstraints = false
|
||||||
acceptFollowRequestButtonShadowBackgroundContainer.addSubview(acceptFollowRequestButton)
|
acceptFollowRequestButtonShadowBackgroundContainer.addSubview(acceptFollowRequestButton)
|
||||||
NSLayoutConstraint.activate([
|
acceptFollowRequestButton.pinToParent()
|
||||||
acceptFollowRequestButton.topAnchor.constraint(equalTo: acceptFollowRequestButtonShadowBackgroundContainer.topAnchor),
|
|
||||||
acceptFollowRequestButton.leadingAnchor.constraint(equalTo: acceptFollowRequestButtonShadowBackgroundContainer.leadingAnchor),
|
|
||||||
acceptFollowRequestButton.trailingAnchor.constraint(equalTo: acceptFollowRequestButtonShadowBackgroundContainer.trailingAnchor),
|
|
||||||
acceptFollowRequestButton.bottomAnchor.constraint(equalTo: acceptFollowRequestButtonShadowBackgroundContainer.bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
rejectFollowRequestButton.translatesAutoresizingMaskIntoConstraints = false
|
rejectFollowRequestButton.translatesAutoresizingMaskIntoConstraints = false
|
||||||
rejectFollowRequestButtonShadowBackgroundContainer.addSubview(rejectFollowRequestButton)
|
rejectFollowRequestButtonShadowBackgroundContainer.addSubview(rejectFollowRequestButton)
|
||||||
NSLayoutConstraint.activate([
|
rejectFollowRequestButton.pinToParent()
|
||||||
rejectFollowRequestButton.topAnchor.constraint(equalTo: rejectFollowRequestButtonShadowBackgroundContainer.topAnchor),
|
|
||||||
rejectFollowRequestButton.leadingAnchor.constraint(equalTo: rejectFollowRequestButtonShadowBackgroundContainer.leadingAnchor),
|
|
||||||
rejectFollowRequestButton.trailingAnchor.constraint(equalTo: rejectFollowRequestButtonShadowBackgroundContainer.trailingAnchor),
|
|
||||||
rejectFollowRequestButton.bottomAnchor.constraint(equalTo: rejectFollowRequestButtonShadowBackgroundContainer.bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
followRequestContainerView.axis = .horizontal
|
followRequestContainerView.axis = .horizontal
|
||||||
followRequestContainerView.distribution = .fillEqually
|
followRequestContainerView.distribution = .fillEqually
|
||||||
|
|
|
@ -110,12 +110,7 @@ extension PollOptionView {
|
||||||
|
|
||||||
voteProgressStripView.translatesAutoresizingMaskIntoConstraints = false
|
voteProgressStripView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
roundedBackgroundView.addSubview(voteProgressStripView)
|
roundedBackgroundView.addSubview(voteProgressStripView)
|
||||||
NSLayoutConstraint.activate([
|
voteProgressStripView.pinToParent()
|
||||||
voteProgressStripView.topAnchor.constraint(equalTo: roundedBackgroundView.topAnchor),
|
|
||||||
voteProgressStripView.leadingAnchor.constraint(equalTo: roundedBackgroundView.leadingAnchor),
|
|
||||||
voteProgressStripView.trailingAnchor.constraint(equalTo: roundedBackgroundView.trailingAnchor),
|
|
||||||
voteProgressStripView.bottomAnchor.constraint(equalTo: roundedBackgroundView.bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
checkmarkBackgroundView.translatesAutoresizingMaskIntoConstraints = false
|
checkmarkBackgroundView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
roundedBackgroundView.addSubview(checkmarkBackgroundView)
|
roundedBackgroundView.addSubview(checkmarkBackgroundView)
|
||||||
|
@ -138,12 +133,7 @@ extension PollOptionView {
|
||||||
|
|
||||||
plusCircleImageView.translatesAutoresizingMaskIntoConstraints = false
|
plusCircleImageView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
addSubview(plusCircleImageView)
|
addSubview(plusCircleImageView)
|
||||||
NSLayoutConstraint.activate([
|
plusCircleImageView.pinTo(to: checkmarkBackgroundView)
|
||||||
plusCircleImageView.topAnchor.constraint(equalTo: checkmarkBackgroundView.topAnchor),
|
|
||||||
plusCircleImageView.leadingAnchor.constraint(equalTo: checkmarkBackgroundView.leadingAnchor),
|
|
||||||
plusCircleImageView.trailingAnchor.constraint(equalTo: checkmarkBackgroundView.trailingAnchor),
|
|
||||||
plusCircleImageView.bottomAnchor.constraint(equalTo: checkmarkBackgroundView.bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
optionTextField.translatesAutoresizingMaskIntoConstraints = false
|
optionTextField.translatesAutoresizingMaskIntoConstraints = false
|
||||||
roundedBackgroundView.addSubview(optionTextField)
|
roundedBackgroundView.addSubview(optionTextField)
|
||||||
|
|
|
@ -137,12 +137,7 @@ extension ProfileCardView {
|
||||||
container.spacing = 8
|
container.spacing = 8
|
||||||
container.translatesAutoresizingMaskIntoConstraints = false
|
container.translatesAutoresizingMaskIntoConstraints = false
|
||||||
addSubview(container)
|
addSubview(container)
|
||||||
NSLayoutConstraint.activate([
|
container.pinToParent()
|
||||||
container.topAnchor.constraint(equalTo: topAnchor),
|
|
||||||
container.leadingAnchor.constraint(equalTo: leadingAnchor),
|
|
||||||
container.trailingAnchor.constraint(equalTo: trailingAnchor),
|
|
||||||
container.bottomAnchor.constraint(equalTo: bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
// bannerContainer
|
// bannerContainer
|
||||||
let bannerContainer = UIView()
|
let bannerContainer = UIView()
|
||||||
|
@ -237,11 +232,8 @@ extension ProfileCardView {
|
||||||
|
|
||||||
relationshipActionButton.translatesAutoresizingMaskIntoConstraints = false
|
relationshipActionButton.translatesAutoresizingMaskIntoConstraints = false
|
||||||
relationshipActionButtonShadowContainer.addSubview(relationshipActionButton)
|
relationshipActionButtonShadowContainer.addSubview(relationshipActionButton)
|
||||||
|
relationshipActionButton.pinToParent()
|
||||||
NSLayoutConstraint.activate([
|
NSLayoutConstraint.activate([
|
||||||
relationshipActionButton.topAnchor.constraint(equalTo: relationshipActionButtonShadowContainer.topAnchor),
|
|
||||||
relationshipActionButton.leadingAnchor.constraint(equalTo: relationshipActionButtonShadowContainer.leadingAnchor),
|
|
||||||
relationshipActionButton.trailingAnchor.constraint(equalTo: relationshipActionButtonShadowContainer.trailingAnchor),
|
|
||||||
relationshipActionButton.bottomAnchor.constraint(equalTo: relationshipActionButtonShadowContainer.bottomAnchor),
|
|
||||||
relationshipActionButtonShadowContainer.widthAnchor.constraint(greaterThanOrEqualToConstant: ProfileCardView.friendshipActionButtonSize.width).priority(.required - 1),
|
relationshipActionButtonShadowContainer.widthAnchor.constraint(greaterThanOrEqualToConstant: ProfileCardView.friendshipActionButtonSize.width).priority(.required - 1),
|
||||||
relationshipActionButtonShadowContainer.heightAnchor.constraint(equalToConstant: ProfileCardView.friendshipActionButtonSize.height).priority(.required - 1),
|
relationshipActionButtonShadowContainer.heightAnchor.constraint(equalToConstant: ProfileCardView.friendshipActionButtonSize.height).priority(.required - 1),
|
||||||
])
|
])
|
||||||
|
|
|
@ -236,12 +236,7 @@ extension StatusView {
|
||||||
// container
|
// container
|
||||||
containerStackView.translatesAutoresizingMaskIntoConstraints = false
|
containerStackView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
addSubview(containerStackView)
|
addSubview(containerStackView)
|
||||||
NSLayoutConstraint.activate([
|
containerStackView.pinToParent()
|
||||||
containerStackView.topAnchor.constraint(equalTo: topAnchor),
|
|
||||||
containerStackView.leadingAnchor.constraint(equalTo: leadingAnchor),
|
|
||||||
containerStackView.trailingAnchor.constraint(equalTo: trailingAnchor),
|
|
||||||
containerStackView.bottomAnchor.constraint(equalTo: bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
// header
|
// header
|
||||||
headerIconImageView.isUserInteractionEnabled = false
|
headerIconImageView.isUserInteractionEnabled = false
|
||||||
|
@ -392,12 +387,7 @@ extension StatusView.Style {
|
||||||
|
|
||||||
statusView.spoilerOverlayView.translatesAutoresizingMaskIntoConstraints = false
|
statusView.spoilerOverlayView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
statusView.containerStackView.addSubview(statusView.spoilerOverlayView)
|
statusView.containerStackView.addSubview(statusView.spoilerOverlayView)
|
||||||
NSLayoutConstraint.activate([
|
statusView.contentContainer.pinTo(to: statusView.spoilerOverlayView)
|
||||||
statusView.contentContainer.topAnchor.constraint(equalTo: statusView.spoilerOverlayView.topAnchor),
|
|
||||||
statusView.contentContainer.leadingAnchor.constraint(equalTo: statusView.spoilerOverlayView.leadingAnchor),
|
|
||||||
statusView.contentContainer.trailingAnchor.constraint(equalTo: statusView.spoilerOverlayView.trailingAnchor),
|
|
||||||
statusView.contentContainer.bottomAnchor.constraint(equalTo: statusView.spoilerOverlayView.bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
// media container: V - [ mediaGridContainerView ]
|
// media container: V - [ mediaGridContainerView ]
|
||||||
statusView.mediaContainerView.translatesAutoresizingMaskIntoConstraints = false
|
statusView.mediaContainerView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
|
@ -409,12 +399,7 @@ extension StatusView.Style {
|
||||||
|
|
||||||
statusView.mediaGridContainerView.translatesAutoresizingMaskIntoConstraints = false
|
statusView.mediaGridContainerView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
statusView.mediaContainerView.addSubview(statusView.mediaGridContainerView)
|
statusView.mediaContainerView.addSubview(statusView.mediaGridContainerView)
|
||||||
NSLayoutConstraint.activate([
|
statusView.mediaGridContainerView.pinToParent()
|
||||||
statusView.mediaGridContainerView.topAnchor.constraint(equalTo: statusView.mediaContainerView.topAnchor),
|
|
||||||
statusView.mediaGridContainerView.leadingAnchor.constraint(equalTo: statusView.mediaContainerView.leadingAnchor),
|
|
||||||
statusView.mediaGridContainerView.trailingAnchor.constraint(equalTo: statusView.mediaContainerView.trailingAnchor),
|
|
||||||
statusView.mediaGridContainerView.bottomAnchor.constraint(equalTo: statusView.mediaContainerView.bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
// pollContainerView: V - [ pollTableView | pollStatusStackView ]
|
// pollContainerView: V - [ pollTableView | pollStatusStackView ]
|
||||||
statusView.pollAdaptiveMarginContainerView.contentView = statusView.pollContainerView
|
statusView.pollAdaptiveMarginContainerView.contentView = statusView.pollContainerView
|
||||||
|
|
|
@ -66,12 +66,7 @@ extension UserView {
|
||||||
// container
|
// container
|
||||||
containerStackView.translatesAutoresizingMaskIntoConstraints = false
|
containerStackView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
addSubview(containerStackView)
|
addSubview(containerStackView)
|
||||||
NSLayoutConstraint.activate([
|
containerStackView.pinToParent()
|
||||||
containerStackView.topAnchor.constraint(equalTo: topAnchor),
|
|
||||||
containerStackView.leadingAnchor.constraint(equalTo: leadingAnchor),
|
|
||||||
containerStackView.trailingAnchor.constraint(equalTo: trailingAnchor),
|
|
||||||
containerStackView.bottomAnchor.constraint(equalTo: bottomAnchor)
|
|
||||||
])
|
|
||||||
|
|
||||||
avatarButton.translatesAutoresizingMaskIntoConstraints = false
|
avatarButton.translatesAutoresizingMaskIntoConstraints = false
|
||||||
containerStackView.addArrangedSubview(avatarButton)
|
containerStackView.addArrangedSubview(avatarButton)
|
||||||
|
|
|
@ -48,12 +48,7 @@ extension SpoilerOverlayView {
|
||||||
private func _init() {
|
private func _init() {
|
||||||
containerStackView.translatesAutoresizingMaskIntoConstraints = false
|
containerStackView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
addSubview(containerStackView)
|
addSubview(containerStackView)
|
||||||
NSLayoutConstraint.activate([
|
containerStackView.pinToParent()
|
||||||
containerStackView.topAnchor.constraint(equalTo: topAnchor),
|
|
||||||
containerStackView.leadingAnchor.constraint(equalTo: leadingAnchor),
|
|
||||||
containerStackView.trailingAnchor.constraint(equalTo: trailingAnchor),
|
|
||||||
containerStackView.bottomAnchor.constraint(equalTo: bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
let topPaddingView = UIView()
|
let topPaddingView = UIView()
|
||||||
topPaddingView.translatesAutoresizingMaskIntoConstraints = false
|
topPaddingView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
|
|
|
@ -53,12 +53,7 @@ extension PollOptionTableViewCell {
|
||||||
|
|
||||||
pollOptionView.translatesAutoresizingMaskIntoConstraints = false
|
pollOptionView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
contentView.addSubview(pollOptionView)
|
contentView.addSubview(pollOptionView)
|
||||||
NSLayoutConstraint.activate([
|
pollOptionView.pinToParent()
|
||||||
pollOptionView.topAnchor.constraint(equalTo: contentView.topAnchor),
|
|
||||||
pollOptionView.leadingAnchor.constraint(equalTo: contentView.leadingAnchor),
|
|
||||||
pollOptionView.trailingAnchor.constraint(equalTo: contentView.trailingAnchor),
|
|
||||||
pollOptionView.bottomAnchor.constraint(equalTo: contentView.bottomAnchor),
|
|
||||||
])
|
|
||||||
pollOptionView.setup(style: .plain)
|
pollOptionView.setup(style: .plain)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -67,12 +67,7 @@ extension ProfileCardTableViewCell {
|
||||||
|
|
||||||
profileCardView.translatesAutoresizingMaskIntoConstraints = false
|
profileCardView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
contentView.addSubview(profileCardView)
|
contentView.addSubview(profileCardView)
|
||||||
NSLayoutConstraint.activate([
|
profileCardView.pinTo(to: shadowBackgroundContainer)
|
||||||
profileCardView.topAnchor.constraint(equalTo: shadowBackgroundContainer.topAnchor),
|
|
||||||
profileCardView.leadingAnchor.constraint(equalTo: shadowBackgroundContainer.leadingAnchor),
|
|
||||||
profileCardView.trailingAnchor.constraint(equalTo: shadowBackgroundContainer.trailingAnchor),
|
|
||||||
profileCardView.bottomAnchor.constraint(equalTo: shadowBackgroundContainer.bottomAnchor),
|
|
||||||
])
|
|
||||||
|
|
||||||
profileCardView.delegate = self
|
profileCardView.delegate = self
|
||||||
|
|
||||||
|
|
|
@ -96,12 +96,7 @@ open class TimelineLoaderTableViewCell: UITableViewCell {
|
||||||
stackView.translatesAutoresizingMaskIntoConstraints = false
|
stackView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
stackView.isUserInteractionEnabled = false
|
stackView.isUserInteractionEnabled = false
|
||||||
contentView.addSubview(stackView)
|
contentView.addSubview(stackView)
|
||||||
NSLayoutConstraint.activate([
|
stackView.pinTo(to: loadMoreButton)
|
||||||
stackView.topAnchor.constraint(equalTo: loadMoreButton.topAnchor),
|
|
||||||
stackView.leadingAnchor.constraint(equalTo: loadMoreButton.leadingAnchor),
|
|
||||||
stackView.trailingAnchor.constraint(equalTo: loadMoreButton.trailingAnchor),
|
|
||||||
stackView.bottomAnchor.constraint(equalTo: loadMoreButton.bottomAnchor),
|
|
||||||
])
|
|
||||||
let leftPaddingView = UIView()
|
let leftPaddingView = UIView()
|
||||||
leftPaddingView.translatesAutoresizingMaskIntoConstraints = false
|
leftPaddingView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
stackView.addArrangedSubview(leftPaddingView)
|
stackView.addArrangedSubview(leftPaddingView)
|
||||||
|
|
|
@ -102,12 +102,7 @@ extension ShareViewController {
|
||||||
addChild(composeContentViewController)
|
addChild(composeContentViewController)
|
||||||
composeContentViewController.view.translatesAutoresizingMaskIntoConstraints = false
|
composeContentViewController.view.translatesAutoresizingMaskIntoConstraints = false
|
||||||
view.addSubview(composeContentViewController.view)
|
view.addSubview(composeContentViewController.view)
|
||||||
NSLayoutConstraint.activate([
|
composeContentViewController.view.pinToParent()
|
||||||
composeContentViewController.view.topAnchor.constraint(equalTo: view.topAnchor),
|
|
||||||
composeContentViewController.view.leadingAnchor.constraint(equalTo: view.leadingAnchor),
|
|
||||||
composeContentViewController.view.trailingAnchor.constraint(equalTo: view.trailingAnchor),
|
|
||||||
composeContentViewController.view.bottomAnchor.constraint(equalTo: view.bottomAnchor),
|
|
||||||
])
|
|
||||||
composeContentViewController.didMove(toParent: self)
|
composeContentViewController.didMove(toParent: self)
|
||||||
|
|
||||||
self.composeContentViewModel = composeContentViewModel
|
self.composeContentViewModel = composeContentViewModel
|
||||||
|
|
Loading…
Reference in New Issue