Skip to content

Commit

Permalink
💫 Update: Exp - AdaptiveModal
Browse files Browse the repository at this point in the history
This reverts commit 7ca4db2.
  • Loading branch information
dominicstop committed Jun 4, 2023
1 parent d8fee71 commit caae311
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ struct AdaptiveModalInterpolationPoint: Equatable {

func apply(toModalView modalView: UIView){
modalView.frame = self.computedRect;
// modalView.layer.cornerRadius = self.modalCornerRadius;
// modalView.layer.maskedCorners = self.modalMaskedCorners;
modalView.layer.cornerRadius = self.modalCornerRadius;
modalView.layer.maskedCorners = self.modalMaskedCorners;
};

func apply(toDummyModalView dummyModalView: UIView){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,6 @@ class AdaptiveModalManager {
rangeInput: [CGFloat]? = nil,
rangeOutput: [AdaptiveModalInterpolationPoint]? = nil
) -> CGFloat? {
return nil;

guard let interpolationSteps = rangeOutput ?? self.interpolationStepsSorted,
let interpolationRangeInput = rangeInput ?? self.interpolationRangeInput
Expand Down Expand Up @@ -627,23 +626,6 @@ class AdaptiveModalManager {
self.applyInterpolationToModalBackgroundVisualEffect(
forInputPercentValue: inputPercentValue
);

let layerMask: CAShapeLayer = {
let path = UIBezierPath(
shouldRoundRect: modalView.bounds,
topLeftRadius: 20,
topRightRadius: 20,
bottomLeftRadius: 20,
bottomRightRadius: 20
);

let shape = CAShapeLayer();
shape.path = path.cgPath;

return shape;
}();

self.modalView!.layer.mask = layerMask;
};

func applyInterpolationToModal(forPoint point: CGPoint){
Expand Down Expand Up @@ -903,26 +885,6 @@ class AdaptiveModalManager {
);

self.prevModalFrame = nextModalFrame;

print("onDisplayLinkTick - timestamp: \(displayLink.timestamp)");


let layerMask: CAShapeLayer = {
let path = UIBezierPath(
shouldRoundRect: dummyModalViewPresentationLayer.bounds,
topLeftRadius: 20,
topRightRadius: 20,
bottomLeftRadius: 20,
bottomRightRadius: 20
);

let shape = CAShapeLayer();
shape.path = path.cgPath;

return shape;
}();

self.modalView!.layer.mask = layerMask;
};

// MARK: - User-Invoked Functions
Expand Down

0 comments on commit caae311

Please sign in to comment.