Skip to content
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

Naxam topTabbedpage crash on iOS at run time #23

Open
Jeffnac opened this issue Nov 13, 2018 · 3 comments
Open

Naxam topTabbedpage crash on iOS at run time #23

Jeffnac opened this issue Nov 13, 2018 · 3 comments

Comments

@Jeffnac
Copy link

Jeffnac commented Nov 13, 2018

Hi,
I get this error when using the plugin on iOS at run time:
"Parameter name: str
at Foundation.NSString..ctor (System.String str) [0x00027] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.1.0.15/src/Xamarin.iOS/Foundation/NSString.cs:142
at Naxam.Controls.Platform.iOS.TabsView+<>c.b__17_0 (System.String x) [0x00000] in <1f6b2b7c8f6c4ec4b46e787d64141cd6>:0
at System.Linq.Enumerable+SelectListIterator2[TSource,TResult].MoveNext () [0x00048] in <157801ffd81243c692c66aee241887cd>:0 at System.Collections.Generic.LargeArrayBuilder1[T].AddRange (System.Collections.Generic.IEnumerable1[T] items) [0x0005e] in <157801ffd81243c692c66aee241887cd>:0 at System.Collections.Generic.EnumerableHelpers.ToArray[T] (System.Collections.Generic.IEnumerable1[T] source) [0x00033] in <157801ffd81243c692c66aee241887cd>:0
at System.Linq.Enumerable.ToArray[TSource] (System.Collections.Generic.IEnumerable1[T] source) [0x00018] in <157801ffd81243c692c66aee241887cd>:0 at Naxam.Controls.Platform.iOS.TabsView.SetItems (System.Collections.Generic.IEnumerable1[T] titles) [0x00030] in <1f6b2b7c8f6c4ec4b46e787d64141cd6>:0
at Naxam.Controls.Platform.iOS.TopTabbedRenderer.SetControllers () [0x0007d] in <1f6b2b7c8f6c4ec4b46e787d64141cd6>:0
at Naxam.Controls.Platform.iOS.TopTabbedRenderer.OnPagesChanged (System.Object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x0002b] in <1f6b2b7c8f6c4ec4b46e787d64141cd6>:0
at Naxam.Controls.Platform.iOS.TopTabbedRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00051] in <1f6b2b7c8f6c4ec4b46e787d64141cd6>:0
at Xamarin.Forms.Platform.iOS.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x00014] in <85a5f025a15045539371e93897914a5b>:0
at Xamarin.Forms.Platform.iOS.TabbedRenderer.SetupPage (Xamarin.Forms.Page page, System.Int32 index) [0x0000a] in <85a5f025a15045539371e93897914a5b>:0
at Xamarin.Forms.Platform.iOS.TabbedRenderer.Reset () [0x0001c] in <85a5f025a15045539371e93897914a5b>:0
at Xamarin.Forms.Internals.NotifyCollectionChangedEventArgsExtensions.Apply (System.Collections.Specialized.NotifyCollectionChangedEventArgs self, System.Action3[T1,T2,T3] insert, System.Action2[T1,T2] removeAt, System.Action reset) [0x001f9] in D:\a\1\s\Xamarin.Forms.Core\Internals\NotifyCollectionChangedEventArgsExtensions.cs:79
at Xamarin.Forms.Platform.iOS.TabbedRenderer.OnPagesChanged (System.Object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x00000] in <85a5f025a15045539371e93897914a5b>:0
at Xamarin.Forms.Platform.iOS.TabbedRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00063] in <85a5f025a15045539371e93897914a5b>:0
at Xamarin.Forms.Platform.iOS.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x00014] in <85a5f025a15045539371e93897914a5b>:0
at Xamarin.Forms.Platform.iOS.NavigationRenderer.CreateViewControllerForPage (Xamarin.Forms.Page page) [0x00008] in <85a5f025a15045539371e93897914a5b>:0
at Xamarin.Forms.Platform.iOS.NavigationRenderer+d__51.MoveNext () [0x0001d] in <85a5f025a15045539371e93897914a5b>:0"

I use the version 0.0.3.5
I also add the plugin MaterialControls V1.22
I add "TopTabbedRenderer.Init();" in the AppDelegate

I am not using a XAML file but a full cs file, may it be the origin of the problem ?

@Jeffnac
Copy link
Author

Jeffnac commented Nov 13, 2018

Ich rewrite my class using xaml


<?xml version="1.0" encoding="utf-8" ?>
<forms:TopTabbedPage  xmlns="http://xamarin.com/schemas/2014/forms"
    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
    xmlns:android="clr-namespace:Xamarin.Forms.PlatformConfiguration.AndroidSpecific;assembly=Xamarin.Forms.Core"
    android:TabbedPage.BarSelectedItemColor ="#FE5C5C"
    xmlns:views="clr-namespace:App.Views"
    xmlns:forms="clr-namespace:Naxam.Controls.Forms;assembly=Naxam.TopTabbedPage.Forms"
    xmlns:VM="clr-namespace:App.ViewModels"
    x:Class="App.Views.SearchsView"
>
  <!--Pages can be added as references or inline-->
    <views:SearchListView Icon="calendar_icon.png" >
        <x:Arguments>
            <x:String>Agenda</x:String>
        </x:Arguments>
    </views:SearchListView>
    <views:SearchListView Icon="hotel_catering_icon.png" >
        <x:Arguments>
            <x:String>HebergRestau</x:String>
        </x:Arguments>
    </views:SearchListView>
    <views:SearchListView Icon="leisure_icon.png" >
        <x:Arguments>
            <x:String>Activity</x:String>
        </x:Arguments>
    </views:SearchListView>
    <views:SearchListView Icon="eye_icon.png" >
        <x:Arguments>
            <x:String>Tourism</x:String>
        </x:Arguments>
    </views:SearchListView>
    <views:SearchListView Icon="transport_health_icon.png" >
        <x:Arguments>
            <x:String>Pratique</x:String>
        </x:Arguments>
    </views:SearchListView>
</forms:TopTabbedPage>

But I still get the same error.

@tuyen-vuduc
Copy link
Contributor

Are you sure your page having title?

@tuyen-vuduc
Copy link
Contributor

Hi,

Have you managed to use it? We prerelease our package here, it's worth a lot for us to have you try it.

Cheers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants