Skip to content

Commit

Permalink
💫 Update: Exp - AdaptiveModal
Browse files Browse the repository at this point in the history
Summary: Update experiment/test - `swift-programmatic-modal/AdaptiveModal`.
  • Loading branch information
dominicstop committed Jun 5, 2023
1 parent 0a5f0d7 commit 40576ed
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ struct AdaptiveModalInterpolationPoint: Equatable {

func apply(toModalBackgroundView modalBgView: UIView?){
modalBgView?.alpha = self.modalBackgroundOpacity;
modalBgView?.transform = self.modalTransform;
};

func apply(toBackgroundEffectView effectView: UIVisualEffectView?){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,21 +307,21 @@ class AdaptiveModalManager {
modalBGView.translatesAutoresizingMaskIntoConstraints = false;

NSLayoutConstraint.activate([
modalBGView.topAnchor .constraint(equalTo: modalView.topAnchor ),
modalBGView.bottomAnchor .constraint(equalTo: modalView.bottomAnchor ),
modalBGView.leadingAnchor .constraint(equalTo: modalView.leadingAnchor ),
modalBGView.trailingAnchor.constraint(equalTo: modalView.trailingAnchor),
modalBGView.centerXAnchor.constraint(equalTo: modalView.centerXAnchor),
modalBGView.centerYAnchor.constraint(equalTo: modalView.centerYAnchor),
modalBGView.widthAnchor .constraint(equalTo: modalView.widthAnchor ),
modalBGView.heightAnchor .constraint(equalTo: modalView.heightAnchor ),
]);
};

if let modalBGVisualEffectView = self.modalBackgroundVisualEffectView {
modalBGVisualEffectView.translatesAutoresizingMaskIntoConstraints = false;

NSLayoutConstraint.activate([
modalBGVisualEffectView.topAnchor .constraint(equalTo: modalView.topAnchor ),
modalBGVisualEffectView.bottomAnchor .constraint(equalTo: modalView.bottomAnchor ),
modalBGVisualEffectView.leadingAnchor .constraint(equalTo: modalView.leadingAnchor ),
modalBGVisualEffectView.trailingAnchor.constraint(equalTo: modalView.trailingAnchor),
modalBGVisualEffectView.centerXAnchor.constraint(equalTo: modalView.centerXAnchor),
modalBGVisualEffectView.centerYAnchor.constraint(equalTo: modalView.centerYAnchor),
modalBGVisualEffectView.widthAnchor .constraint(equalTo: modalView.widthAnchor ),
modalBGVisualEffectView.heightAnchor .constraint(equalTo: modalView.heightAnchor ),
]);
};
};
Expand Down

0 comments on commit 40576ed

Please sign in to comment.