mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-24 22:15:57 +03:00
Add convenience method to prepare child view controllers in DocumentActionViewController
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
parent
76045fd989
commit
45b4fee7ba
1 changed files with 12 additions and 0 deletions
|
@ -9,6 +9,18 @@ import FileProviderUI
|
|||
import OSLog
|
||||
|
||||
class DocumentActionViewController: FPUIActionExtensionViewController {
|
||||
func prepare(childViewController: NSViewController) {
|
||||
addChild(childViewController)
|
||||
view.addSubview(childViewController.view)
|
||||
|
||||
NSLayoutConstraint.activate([
|
||||
view.leadingAnchor.constraint(equalTo: childViewController.view.leadingAnchor),
|
||||
view.trailingAnchor.constraint(equalTo: childViewController.view.trailingAnchor),
|
||||
view.topAnchor.constraint(equalTo: childViewController.view.topAnchor),
|
||||
view.bottomAnchor.constraint(equalTo: childViewController.view.bottomAnchor)
|
||||
])
|
||||
}
|
||||
|
||||
override func prepare(
|
||||
forAction actionIdentifier: String, itemIdentifiers: [NSFileProviderItemIdentifier]
|
||||
) {
|
||||
|
|
Loading…
Reference in a new issue