C1CheckBox is not rendering on iOS

Posted by: merickson91 on 15 May 2018, 7:40 am EST

  • Posted 15 May 2018, 7:40 am EST

    I just migrated from Xuni to the most recent C1 libraries. Made all the namespace and class name changes. The Calendar and Guage controls are working fine, but the C1CheckBox control isn’t rendering. Any ideas on other things to check? thanks!

  • Posted 16 May 2018, 2:15 am EST

    This is a guess, but it’s possible you need to add a call into the AppDelagate in your iOS project to initialize the renderer:

            public override bool FinishedLaunching(UIApplication app, NSDictionary options)
            {
                C1.Xamarin.Forms.Core.Platform.iOS.C1CoreRenderer.Init();
    ...
    
    

    Let me know if that fixes it.

    Kelley

  • Posted 17 May 2018, 4:15 am EST

    Yes, I had that line in my AppDelegate. What I’m finding is the C1CheckBox is not visible due to horizontal option in Xaml.

    So, the Xuni controls worked fine.

    <StackLayout Orientation="Horizontal"
                         HorizontalOptions="FillAndExpand"
                         Padding="15,0,10,0">
                <Label Text="Select all"
                       FontSize="Small" />
                <core:C1CheckBox IsChecked="True" Margin="0"></core:C1CheckBox>
            </StackLayout>
    

    That shows “Select all” at the beginning of the line with the checkbox after it with a great deal of space (padding or margins or something) almost to the center of the page.

    If I add ```

    HorizontalOptions=“EndAndExpand”

    
    If I add ```
    HorizontalOptions="EndAndExpand"
    ``` to the CheckBox, it's no longer visible.
  • Posted 17 May 2018, 5:01 am EST

    I can reproduce it too. It looks like there’s some kind of bug with how it behaves in the layout, and as I try to work around it I’m noticing some other small issues with it’s content sizing. We’ll take a look.

    Kelley

  • Posted 31 May 2018, 12:28 am EST

    Hi Alise

    Build 3.0.20181.282 should have a fix for your Checkbox issue, and it should be available today on nuget.org. Let me know if you see any issues.

    Thanks

    Kelley

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels