alexrainman/CarouselView

iOS: Rendering issue

davidtabor90 opened this issue · 2 comments

Hi,

I'm trying to use carousel with scrollview and I found that I can't scroll to the end.
Than i try coloring element and it looks like elements rendering is not well.

I'm using XF 4.4 and CarouselView.FormsPlugin 5.2

Here is easy sample view code

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:d="http://xamarin.com/schemas/2014/forms/design"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             mc:Ignorable="d"
             x:Class="MyApp.Views.TestPage"
             xmlns:carousel="clr-namespace:CarouselView.FormsPlugin.Abstractions;assembly=CarouselView.FormsPlugin.Abstractions">
    <ContentPage.Content>
        <StackLayout BackgroundColor="Yellow"
            Margin="20">
            <carousel:CarouselViewControl
                x:Name="carouselControl"
                BackgroundColor="Accent"
                Margin="20"
                VerticalOptions="FillAndExpand"
                HorizontalOptions="FillAndExpand">
                <carousel:CarouselViewControl.ItemsSource>
                    <x:Array Type="{x:Type BoxView}">
                        <BoxView 
                            BackgroundColor="Red"   
                            Margin="20" 
                            VerticalOptions="FillAndExpand"
                            HorizontalOptions="FillAndExpand"/>
                        <BoxView 
                            BackgroundColor="Gray" 
                            Margin="20"
                            VerticalOptions="FillAndExpand"
                            HorizontalOptions="FillAndExpand"/>
                    </x:Array>
                </carousel:CarouselViewControl.ItemsSource>
            </carousel:CarouselViewControl>
        </StackLayout>
    </ContentPage.Content>
</ContentPage>

Here is result on iPhone
image

Here is result after add some space in code when debugging and HotReload refresh page
image

Why you need to use it inside a ScrollView?

I have same problem with following hierarchy

ScrollView
 - Stack
      - Header Card
      - Horizontal Stack to mimic 2 tabs
      - CarouselView

I have to enable vertical scrolling data for both tabs.
So Header Card, Tabs and Carousel Content it self can move upword