You can create a custom modal presentation without using your custom presentation controller by specifying the system-provided UIModalPresentationStyle
when presenting your view controller. Here's an example:
let viewController = MyViewController()
// Specify the built-in modal presentation style
viewController.modalPresentationStyle = .fullScreen
// Present the view controller
present(viewController, animated: true, completion: nil)
In this example, we create an instance of MyViewController
and set its modalPresentationStyle
property to .fullScreen
, which is a built-in style provided by UIKit. We then call present(_:animated:completion:)
to present the view controller using the system-provided modal presentation.
By doing this, we effectively ignore any custom presentation controller that we may have set up for MyViewController
.
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2022-06-14 11:00:00 +0000
Seen: 14 times
Last updated: Jul 01 '21
How can one ensure that sub-classes have uniform method parameters in TypeScript?
How can the calculation of matrix determinant be performed using CUDA?
How can code repetition be prevented when using (box)plot functions?
When I attempt to generate a database, why does the azure-cosmos-emulator become unresponsive?
What steps can I take to prevent my webpage from slowing down when all parts of a div are displayed?