iosMain.dev.programadorthi.routing.darwin.UIKitUINavigationController.ios.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of uikit Show documentation
Show all versions of uikit Show documentation
An extensible and multiplatform routing system powered by Ktor
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)
}
}