| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
…enting it over the rootViewController When NativeScript embedded app is created from the native one we check for whether the topmost UIViewController has NativeScriptEmbedder protocol (implemented in the iOS Runtime) method 'presentNativeScriptApp:'. If yes, we call it with the NS app viewcontroller as a parameter so the embedder has control over the NS app (where and how to present it etc.) For backwards compatibility we present the NS app on top of the topmost UIViewController as a fallback.
…:NativeScript/NativeScript into tdermendzhiev/pass-embedded-ns-to-native
When embedding a NativeScript application, the native class, calling the NS runtime, should conform to NativeScriptEmbedder protocol in order get a reference to the NativeScript application viewcontroller. Related to NativeScript/NativeScript#5967
When embedding a NativeScript application, the native class, calling the NS runtime, should conform to NativeScriptEmbedder protocol in order get a reference to the NativeScript application viewcontroller. Related to NativeScript/NativeScript#5967
When embedding a NativeScript application, the native class, calling the NS runtime, should conform to NativeScriptEmbedder protocol in order get a reference to the NativeScript application viewcontroller. Related to NativeScript/NativeScript#5967
| } | ||
| } | ||
|
|
||
| public getTopmostViewController(rootViewController: UIViewController): UIViewController { |
There was a problem hiding this comment.
@vakrilov Do we need to add documentation about this new public function? It can be quite useful when dealing with UIViewControllers and I think that it's a good idea.
Sorry, something went wrong.
There was a problem hiding this comment.
Yup - we can expose it.
I think it better to make it static (it doesn't really need this). You can put it in the ios namespace in the utils module and the documentation should go in [utils.d.ts[(https://github.com/NativeScript/NativeScript/blob/master/tns-core-modules/utils/utils.d.ts#L185)
Sorry, something went wrong.
…h if !rootController
There was a problem hiding this comment.
Add docs for getVisibleViewController pls.
Otherwise looks good.
Sorry, something went wrong.
| */ | ||
| export function getCurrentAppPath(): string; | ||
|
|
||
| export function getVisibleViewController(rootViewController: UIViewController): UIViewController; |
There was a problem hiding this comment.
Add JSDoc for getVisibleViewController
Sorry, something went wrong.
NativeScriptEmbedder is responsive for communication between the NS and the native iOS app. His delegate will implement methods which we can call from javascript such as "presentNativeScriptApp:".
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
When NativeScript embedded app is created from the native one we check for whether the topmost UIViewController has NativeScriptEmbedder protocol (implemented in the iOS Runtime) method 'presentNativeScriptApp:'. If yes, we call it with the NS app viewcontroller as a parameter so the embedder has control over the NS app (where and how to present it etc.) For backwards compatibility we present the NS app on top of the topmost UIViewController as a fallback.
PR Checklist
What is the current behavior?
Currently embedded app is always presented on top of the rootViewController.
What is the new behavior?
The embedder is now able to choose where to present the NS app (present, push, add as a child ViewController etc.) by implementing 'presentNativeScriptApp' method. Even when he does not implement it the NS app will present on top of the visible(topmost) viewcontroller instead of the root one (which may be hidden in some scenarios).