Skip to content
This repository was archived by the owner on Feb 13, 2019. It is now read-only.
This repository was archived by the owner on Feb 13, 2019. It is now read-only.

PanelContentDelegate not being called  #24

@sriteja25

Description

@sriteja25

Hello first of all thanks for this project. I am trying to integrate this into my Objective C project using swift extensions as you mentioned in some other issue. But Panel Delegate is not being called.

here is the method I am calling in my Objective C class

self.webBroserVc.modalPresentationStyle = UIModalPresentationPopover;
UIPopoverPresentationController * popoverVc = self.webBroserVc.popoverPresentationController;
popoverVc.sourceView = self.browserButton;
popoverVc.sourceRect = CGRectMake(self.browserButton.bounds.size.width/2, self.browserButton.bounds.size.height/2, 0, 0);
//popoverVc.preferredContentSize = CGSizeMake(250, 250);
[self presentViewController:self.webBroserVc animated:YES completion:nil];

Now I am using an extension to call the Panel Kit methods for PanelManager and PanelControlDelegate

extension CanvasViewController : PanelManager{

public var panels: [PanelViewController] {
    let mapPanelVC = PanelViewController(with: self.webBroserVc, in: self)
    return [mapPanelVC]
}

public var panelContentWrapperView: UIView {
    return self.view
}

public var panelContentView: UIView {
    return scrollViewContainer
}

}
extension WebBrowserViewController : PanelContentDelegate {
public var preferredPanelContentSize: CGSize {
return CGSize(width: 320, height: 500)
}

public var maximumPanelContentSize: CGSize {
    return CGSize(width: 512, height: 600)
}

public var preferredPanelPinnedWidth: CGFloat {
    return 500
}

But the PanelContentDelegate is not being called, can you please tell me what I am doing wrong @louisdh

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions