-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Passing viewController to iOS integration point and popping/dismissing
- Loading branch information
1 parent
60bda2d
commit 7ee043b
Showing
3 changed files
with
25 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 15 additions & 5 deletions
20
...common/src/iosMain/kotlin/com/bumble/appyx/navigation/integration/MainIntegrationPoint.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,24 @@ | ||
package com.bumble.appyx.navigation.integration | ||
|
||
import com.bumble.appyx.navigation.integrationpoint.IntegrationPoint | ||
import platform.UIKit.UIViewController | ||
import platform.UIKit.navigationController | ||
|
||
class MainIntegrationPoint: IntegrationPoint() { | ||
private lateinit var viewController: UIViewController | ||
|
||
class MainIntegrationPoint : IntegrationPoint() { | ||
override val isChangingConfigurations: Boolean | ||
get() = false | ||
|
||
@Suppress("EmptyFunctionBlock") | ||
override fun onRootFinished() {} | ||
fun setViewController(viewController: UIViewController) { | ||
this.viewController = viewController | ||
} | ||
|
||
override fun onRootFinished() { | ||
viewController.dismissModalViewControllerAnimated(false) | ||
} | ||
|
||
@Suppress("EmptyFunctionBlock") | ||
override fun handleUpNavigation() {} | ||
override fun handleUpNavigation() { | ||
viewController.navigationController?.popViewControllerAnimated(false) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters