SfAccordion not appear on IOS

Hello, 

I wanted to implement SFACCORDION, on Android I had no problem however with IOS, the component is not displayed.

I am using the latest version of Syncfusion. I also use a BindableLayout to customize the component items.

thanks in advance

13 Replies 1 reply marked as answer

LN Lakshmi Natarajan Syncfusion Team July 14, 2020 05:54 AM UTC

Hi Rigaux, 
 
Thank you for contacting Syncfusion support. 
 
We would like to let you know that you need to initialize SfAccordionRenderer in the iOS project of your application to render the SfAccordion. Please initialize the SfAccordionRenderer in the AppDelegate.cs file as mentioned in our UG documentation,  
 
You can also refer to our online document regarding the same from the following link, 
  
Please let us know if you need any further assistance.  
 
Regards, 
Lakshmi Natarajan 
 



RI Rigaux July 15, 2020 07:14 AM UTC

Hello, 


Thank's for your response but i followed all the steps of documentation (include initialisation with IOS), without success. 






SS SaiGanesh Sakthivel Syncfusion Team July 16, 2020 03:22 PM UTC

Hi Rigaux, 
 
Thank you for the update. 
 
We have checked the reported query “SfAccordion not appear on IOS” from our end. We have prepared the sample with IOS renderer in AppDelegate.cs and we have attached the tested sample in the following link for your reference. 
 
 
let us know it you still facing the same issue. If not, could you please modified our sample or share with following details which would be helpful for us to check on it and provide you the solution at the earliest.  
 
·       Please share the view and viewmodel class 
·       Please share the version of syncfusion control and Xamarin forms 
 
Regards, 
SaiGanesh Sakthivel


MA marcos November 13, 2020 07:51 PM UTC

I faced the same issue and it seems to happen from version 18.2.0.45 and only when loading the control with BindableLayout from OnAppearing event of the page and iOS version. The items are properly visible when changing orientation. It should be a regression from this change: 
  • #278817, #154265 - [iOS] Now, SfAccordion will be resized properly when Accordion item’s visibility is changed in runtime.

And also in Android I am facing an error when setting the bindable property: "Java.Lang.IllegalStateException: 'The specified child already has a parent. You must call removeView() on the child's parent first.'"

I've attached AccordionXamarin proyect updated to last Xamarin Forms 4.8.0.1687 and SfAccordion 18.3.0.48

Attachment: AccordionXamarin_36d7a221.zip


SS SaiGanesh Sakthivel Syncfusion Team November 16, 2020 12:48 PM UTC

Hi Rigaux, 
 
Thank you for contacting syncfusion support. 
 
#Regarding SfAccordion not appear on IOS 
Currently, we are checking the reported query with development team and update the further details on or before the November 18, 2020. We appreciate the patience until then. 
 
Regards, 
SaiGanesh Sakthivel 



LN Lakshmi Natarajan Syncfusion Team November 18, 2020 02:21 PM UTC

Hi Marcos, 
 
Thank you for your patience. 
 
#Regarding error occurs when setting the bindable property in Android 
 
We suggest you to add the collection in the UI thread to overcome the reported scenario. Please refer the following code snippets for more reference, 
 
  public partial class MainPage : ContentPage 
    { 
        public MainPage() 
        { 
            InitializeComponent(); 
            this.BindingContext = this; 
        } 
 
        protected override void OnAppearing() 
        { 
            Device.BeginInvokeOnMainThread(() => 
            { 
                var infoList = new List<ItemInfo>(); 
                infoList.Add(new ItemInfo() { Name = "Cheese burger", Description = "Hamburger accompanied with melted cheese. The term itself is a portmanteau of the words cheese and hamburger. The cheese is usually sliced, then added a short time before the hamburger finishes cooking to allow it to melt." }); 
                infoList.Add(new ItemInfo() { Name = "Veggie burger", Description = "Veggie burger, garden burger, or tofu burger uses a meat analogue, a meat substitute such as tofu, textured vegetable protein, seitan (wheat gluten), Quorn, beans, grains or an assortment of vegetables, which are ground up and formed into patties." }); 
                infoList.Add(new ItemInfo() { Name = "Barbecue burger", Description = "Prepared with ground beef, mixed with onions and barbecue sauce, and then grilled. Once the meat has been turned once, barbecue sauce is spread on top and grilled until the sauce caramelizes." }); 
                infoList.Add(new ItemInfo() { Name = "Chili burger", Description = "Consists of a hamburger, with the patty topped with chili con carne." }); 
                Info = infoList; 
            }); 
 
            base.OnAppearing(); 
        } 
 
 
#Regarding AccordionItems not shown in the view when populating data in OnAppearing override in iOS 
 
We have checked the reported issue and logged the issue for the same. We will fix the issue and include the issue fix in our upcoming Weekly nuget release which is planned to roll out on November 24, 2020. We appreciate your patience until then. 
 
 
Note: The provided feedback link is private, you need to login to view this feedback. 
 
Lakshmi Natarajan 
 


Marked as answer

LN Lakshmi Natarajan Syncfusion Team November 24, 2020 12:43 PM UTC

Hi Marcos, 
 
Thank you for your patience.    
    
We have fixed the reported issue “AccordionItems not shown in the view when populating data in OnAppearing override in iOS” and included the issue fix in our latest Weekly NuGet release update version 18.3.0.51 which is available for download (https://www.nuget.org/).    
 
  
We thank you for your support and appreciate your patience in waiting for this update. Please get in touch with us if you would require any further assistance.    
 
Lakshmi Natarajan 



NA Nasreddine August 5, 2021 07:26 PM UTC

Hello, it is coming back again, I'm testing on IOS 14.5, XF 5.0.0.2083, Sf 19.2.0.51

and it is not appearing on IOS, I have done all the recommended steps here to solve it but with no success.


Thanks   



KK Karthikraja Kalaimani Syncfusion Team August 6, 2021 11:13 AM UTC

Hi Nasreddine, 

Thanks for the update. 

We have checked the reported issue "Accordion items not rendering in iOS simulator 14.5" with SfAccordion v19.2.0.51 and Xamarin Forms v5.0.0.2083. We are unable to reproduce the issue in our end. We have attached the tested sample and video for your reference. 
 
Sample and video link : https://www.syncfusion.com/downloads/support/directtrac/general/ze/AccordionXamarin_36d7a2211571500486.zip

Please check the sample and still if your facing the same issue ? Please modify the sample based on your scenario and revert us back with clear replication procedure. 

Regards,
Karthik Raja
 



NA Nasreddine August 9, 2021 03:01 PM UTC

hello it was a weird fix I set 

VerticalOptions="StartAndExpand"

and that was working for android but not for IOS 

the parent is a grid and the row definition was "*".

thank you very much for the example. 



LN Lakshmi Natarajan Syncfusion Team August 10, 2021 09:58 AM UTC

Hi Nasreddine, 
 
Sorry for the inconvenience caused. 
 
We would like to inform you that the SfAccordion is entirely a template based content we cannot determine default height value to the control when loading the items at run time. If you want to define layout options for Accordion, you can use HorizontalOptions and VerticalOptions as FillAndExpand options for the control to overcome the reported scenario. 
 
Please refer to the following code snippets for more reference, 
<Grid > 
    <Grid.RowDefinitions> 
        <RowDefinition Height="*" /> 
    </Grid.RowDefinitions> 
    <syncfusion:SfAccordion 
        x:Name="Accordion" 
        Grid.Row="0"  
        VerticalOptions="FillAndExpand" 
        HorizontalOptions="FillAndExpand" 
        BindableLayout.ItemsSource="{Binding Info}" 
        ExpandMode="MultipleOrNone"> 
        <BindableLayout.ItemTemplate> 
            <DataTemplate> 
                <syncfusion:AccordionItem> 
                    <syncfusion:AccordionItem.Header> 
                        <Grid> 
                            <Label Text="{Binding Name}" /> 
                        </Grid> 
                    </syncfusion:AccordionItem.Header> 
                    <syncfusion:AccordionItem.Content> 
                        <Grid> 
                            <Label Text="{Binding Description}" /> 
                        </Grid> 
                    </syncfusion:AccordionItem.Content> 
                </syncfusion:AccordionItem> 
            </DataTemplate> 
        </BindableLayout.ItemTemplate> 
    </syncfusion:SfAccordion> 
</Grid> 
 
Please let us know if you need further assistance. 
 
Regards, 
Lakshmi Natarajan 



NA Nasreddine August 10, 2021 10:00 AM UTC

Thank you very much for the response.

I reread the docs again and ended up using the same solution.





LN Lakshmi Natarajan Syncfusion Team August 10, 2021 01:46 PM UTC

Hi Nasreddine, 
 
Thank you for the update. 
 
We are glad that your requirement has been met at your side. Please let us know if you need further assistance. As always, we are happy to help you out. 
 
Lakshmi Natarajan 
 


Loader.
Up arrow icon