forked from slackhq/PanModal
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from croquiscom/feature/APP-10195-over-context-…
…embed APP-10195 : 카테고리 바텀시트 > CLP 전환 시 > 우->좌 전환 + Swipe Back 가능하도록 변경
- Loading branch information
Showing
7 changed files
with
92 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import UIKit | ||
|
||
public typealias OverContextPanModal = UIViewController & OverContextPanModalPresentable | ||
|
||
public class OverContextNavigationController: UINavigationController { | ||
private weak var panModal: OverContextPanModal? | ||
|
||
init(panModal: OverContextPanModal) { | ||
self.panModal = panModal | ||
super.init(nibName: nil, bundle: nil) | ||
|
||
isNavigationBarHidden = true | ||
modalPresentationStyle = .overCurrentContext | ||
view.backgroundColor = .clear | ||
interactivePopGestureRecognizer?.delegate = nil | ||
} | ||
|
||
required init?(coder aDecoder: NSCoder) { | ||
fatalError("init(coder:) has not been implemented") | ||
} | ||
|
||
public override func viewDidLoad() { | ||
super.viewDidLoad() | ||
|
||
panModal?.viewDidLoad() | ||
} | ||
|
||
public override func viewWillAppear(_ animated: Bool) { | ||
super.viewWillAppear(animated) | ||
|
||
panModal?.viewWillAppear(animated) | ||
} | ||
|
||
public override func viewDidAppear(_ animated: Bool) { | ||
super.viewDidAppear(animated) | ||
|
||
panModal?.viewDidAppear(animated) | ||
} | ||
|
||
public override func viewWillDisappear(_ animated: Bool) { | ||
super.viewWillDisappear(animated) | ||
|
||
panModal?.viewWillDisappear(animated) | ||
} | ||
|
||
public override func viewDidDisappear(_ animated: Bool) { | ||
super.viewDidDisappear(animated) | ||
|
||
panModal?.viewDidDisappear(animated) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import UIKit | ||
|
||
public protocol OverContextPanModalPresentable: PanModalPresentable { | ||
|
||
} | ||
|
||
extension OverContextPanModalPresentable where Self: UIViewController { | ||
public var presentStyle: PanModalPresentStyle { | ||
return .embed | ||
} | ||
|
||
public func panModalDidDismiss() { | ||
presentingViewController?.dismiss(animated: false) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -114,4 +114,7 @@ public extension PanModalPresentable where Self: UIViewController { | |
|
||
} | ||
|
||
func panModalDidDismiss() { | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters