Page 1 of 1

CEF window does not resize with NSView

PostPosted: Mon Jan 10, 2022 4:12 am
by UmairZahid5658
I want my CEF window to move as the NSView which is attached with the main window using constraint but my NSView increase with the increase in window but browser view remain same. Can anyone help me to bind the browser view with NSView? The code I do mention below.

Code: Select all
winInfo.setAsChild(of: self.browserView, withRect: CGRect( x: 0, y: 0, width: (view.window?.frame.size.width)!, height: self.browserView.bounds.size.height))
_ = CEFBrowserHost.createBrowser(windowInfo: winInfo, client: newClient, url: URL(string: self.searchField.stringValue ), settings: settings, requestContext: newReq.createContext())


Code: Select all
  @IBOutlet weak var browserView: NSView!


That's my view.