-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue Presenting TEditor from "modal" Xamarin Forms Page (iOS) #3
Comments
Also, the control will not present if Xamarin forms main page is a Master Detail. I'm taking a look at the TEditorImplementation class in the iOS project. I think I might have to check for instances where there is no UINavigationController present. |
Please follow the sample code in repo, TEditor cannot be used in that way "new ContentPage { Content = new TEditorHtmlView(), BackgroundColor = Color.White };" TEditor should be used in a Navigation Page, please make sure your Detail page is Navigation page. |
The master detail problem can be fixed with this code in the iOS project. You'll need to add the Xamarin.Forms Package.
|
Thank you thank you, that worked perfect! |
Hi! I'm trying to apply the solution exposed by @swansca79 but when my plc calls TEditor.CrossTEditor.Current.ShowTEditor it seems that it's not firing the ios overrided one... so the editor never shows up in IOS... Any clue? Detailed example? |
I'm having a similar problem where I call this new overrided function in my iOS project using the Xamarin Dependency service, and it still doesn't show up. The function call never returns, but an error is not thrown. It's like the Thread just exits or something. The editor shows up in the sample app though. I don't see what could be different unless there is an issue with executing on the UIThread. Here is where I'm pushing the new page on the stack:
Here is my code Xamarin.Forms StackLayout class that is calling the iOS specific things. It's this first line that is never being returned from: `
` Here is my interface: `
` Here is my implementation in the iOS project: `
` |
I'm not sure if you can override the method in that manner when the source is in a nuget package. I think it has to do with the bait and switch technique used for most Xamarin packages. I made several changes to the source and created my own package that I use locally. I would assume @bie5865 did the same. |
I'm not convinced that the override function really addresses the problem I'm having, since a separate Xamarin Forms application ran fine with the TEditor. Are there different Xamarin Forms startup options that I should be aware of? For example we are starting the App with a NavigationPage:
|
There are other options, like a TabbedPage or a MasterDetailPage, that's what my code snippet is fixing. Since you are using NavigationPage, you shouldn't need to change anything. The original problem for this issue was launching the editor from a Modal page, so just make sure you aren't doing that. |
Would it be possible to send you a zipped up simple project where I have been able to replicate the behavior? The whole project is just two pages, with a MastersDetail page, and each page is getting called via the MD page. The behavior of the editor not showing up and the thread just dying exists. |
I'm able to present the TE control fine via a Xamarin Forms Page that was that was "Pushed" on the Navigation stack. However, I run into issues if the page that I'm trying to present the control from was a modal, the control will not present. The app doesn't crash either. I've tried both the sample application as well as consuming the nuget package in a simple application.
Steps to Reproduce:
The text was updated successfully, but these errors were encountered: