All Downloads are FREE. Search and download functionalities are using the official Maven repository.

iosMain.dev.programadorthi.routing.darwin.UIKitUINavigationController.ios.kt Maven / Gradle / Ivy

The newest version!
package dev.programadorthi.routing.darwin

import platform.Foundation.NSCoder
import platform.UIKit.UINavigationController

public actual class UIKitUINavigationController actual constructor(coder: NSCoder) :
    UINavigationController(coder) {
        public actual override fun viewControllers(): List =
            super.viewControllers().map { it as UIKitUIViewController }

        public actual override fun popViewControllerAnimated(animated: Boolean): UIKitUIViewController? =
            super.popViewControllerAnimated(animated)

        public actual override fun popToViewController(
            viewController: UIKitUIViewController,
            animated: Boolean,
        ): List? =
            super.popToViewController(
                viewController,
                animated,
            )?.map { it as UIKitUIViewController }

        public actual override fun pushViewController(
            viewController: UIKitUIViewController,
            animated: Boolean,
        ) {
            super.pushViewController(viewController, animated)
        }

        public actual fun setViewControllers(
            viewControllers: List,
            animated: Boolean,
        ) {
            super.setViewControllers(viewControllers, animated)
        }
    }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy