I want to change the height of the popover, I follow every instruction but I got an error that i don't know how to fix that
here is a part of my code
class PatientRecordingsViewController: UIViewController, UIPopoverPresentationControllerDelegate {
...inside a clouser
let vc = EnteringNoteView()
vc.modalPresentationStyle = .popover
if let popover: UIPopoverPresentationController = vc.popoverPresentationController {
popover.delegate = self
popover.sourceView = self?.addNoteViewModel
popover.preferredContentSize = CGSize(width: 100, height: 100)
self?.present(vc, animated: true, completion: nil)
}
In the line of popover.preferredContentSize
I get this error:
Cannot assign to property: 'preferredContentSize' is immutable
Add explicit 'self.' to refer to mutable property of 'TaskViewController'
When I tap on the fix ,it adds .self
:
popover.self.preferredContentSize = CGSize(width: 100, height: 100)
Then it shows the same error again. I will be appreciated if anyone can help me