https://kotlinlang.org logo
#ios
Title
# ios
m

Matthew Kruk

05/02/2022, 8:34 PM
I'm writing a library with a UIViewController that I would like to present as fullscreen, but am so far unsuccessful. I'm calling
viewContoller.presentViewContoller(this, animated = true, completion = null)
but it presents as a modal just the same as calling
viewController?.presentModalViewController(this, animated = true)
. I've also tried explicitly calling
viewController?.setModalPresentationStyle(UIModalPresentationFullScreen)
with the latter. Any idea what I'm doing wrong?
n

Nikolay Kasyanov

05/03/2022, 8:07 AM
have you tried setting modal presentation style of
this
? As I understand, it’s the one getting presented, not
viewController
r

ribesg

05/03/2022, 8:23 AM
I have this in modal VC I want to show as fullscreen
Copy code
init {
        modalPresentationStyle = UIModalPresentationOverFullScreen
    }