Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Commit

Permalink
Fix regression caused by commit c1e481f
Browse files Browse the repository at this point in the history
Fix regression caused by commit c1e481f
add a white mask to MSDrawerPresentationController so that during presentation it won't slide over the navigation bar.

Tested:
MSDrawerController Demo > "Show from custom base"
Device testing: VoiceOver for left/right/top/bottom drawer with rotation.
  • Loading branch information
harrieshin committed Apr 17, 2020
1 parent bcda909 commit 4cf4800
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions OfficeUIFabric/Drawer/MSDrawerPresentationController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,18 @@ class MSDrawerPresentationController: UIPresentationController {
// MARK: Presentation

override func presentationTransitionWillBegin() {
containerView?.addSubview(backgroundView)
backgroundView.fitIntoSuperview()
backgroundView.addSubview(dimmingView)

containerView?.addSubview(contentView)
if presentationDirection.isVertical && actualPresentationOffset == 0 {
containerView?.addSubview(separator)
if let containerView = containerView {
containerView.addSubview(backgroundView)
backgroundView.fitIntoSuperview()
backgroundView.addSubview(dimmingView)

containerView.addSubview(contentView)
// Clipping is added to prevent any animation bug sliding over the navigation bar
contentView.clipsToBounds = true
if presentationDirection.isVertical && actualPresentationOffset == 0 {
containerView.addSubview(separator)
}
}

updateLayout()

contentView.addSubview(shadowView)
Expand Down

0 comments on commit 4cf4800

Please sign in to comment.