AndreaMiotto / PartialSheet

A SwiftUI Partial Sheet fully customizable with dynamic height

Home Page:https://github.com/AndreaMiotto/PartialSheet/wiki

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Crash on tap to show the Partial sheet

Taimoor20 opened this issue · comments

I am tapping my button to show the Partial Sheet view but the app got crashed saying

Thread 1: Fatal error: No ObservableObject of type PSManager found. A View.environmentObject(_:) for PSManager may be missing as an ancestor of this view.

in library's PSManagerWrapper class

This is the link of the image: https://ibb.co/B6QXCMZ

commented

I also have this problem

Hello! it seems that u missed this lines in your code, innit?

/**
The Partial Sheet Manager helps to handle the Partial Sheet when there are many view layers.
Make sure to pass an instance of this manager as an environmentObject to your root view:

let sheetManager: PSManager = PSManager()
contentView.environmentObject(sheetManager)

*/