I am getting an error when running my program on iOS with a gauge, but it works fine on Android. I have tried everything. I cleaned and rebuild the project, I reinstalled the dlls for the project and still get the error.
The gauge that is causing the error is here.
<gauge:SfCircularGauge x:Name="powGauge"
GaugeType="Default"
IsVisible="{Binding IsLoaded}">
<gauge:SfCircularGauge.Scales>
<gauge:Scale StartValue="0"
EndValue="1"
RimColor="Black"
StartAngle="180"
SweepAngle="360"
MinorTicksPerInterval="0"
LabelColor="Transparent">
<gauge:Scale.MajorTickSettings>
<gauge:TickSettings Color="Transparent"/>
</gauge:Scale.MajorTickSettings>
<gauge:Scale.MinorTickSettings>
<gauge:TickSettings Color="Transparent"/>
</gauge:Scale.MinorTickSettings>
<gauge:Scale.Ranges>
<gauge:Range Thickness="75"
Color="Silver"
StartValue="0"
EndValue="1"
Offset="0.05"/>
</gauge:Scale.Ranges>
</gauge:Scale>
<gauge:Scale StartValue="0"
EndValue="{Binding MaxPower}"
RimColor="Black"
StartAngle="157.5"
SweepAngle="225"
MinorTicksPerInterval="1"
LabelColor="Black"
Interval="{Binding PowerScaleInterval}"
LabelOffset="0.3">
<gauge:Scale.MajorTickSettings>
<gauge:TickSettings Length="6"
Thickness="2"
Offset="0.05"
Color="Black"/>
</gauge:Scale.MajorTickSettings>
<gauge:Scale.MinorTickSettings>
<gauge:TickSettings Length="3"
Thickness="2"
Offset="0.05"
Color="Black"/>
</gauge:Scale.MinorTickSettings>
<gauge:Scale.Ranges>
<gauge:Range Thickness="50"
Color="Gray"
StartValue="0"
EndValue="{Binding MaxPower}"
Offset="0.05"/>
<gauge:Range Color="Green"
StartValue="0"
EndValue="{Binding PowerNow}"
Thickness="50"
Offset="0.15"/>
</gauge:Scale.Ranges>
<gauge:Scale.Pointers>
<gauge:NeedlePointer Color="White"
Thickness="1.5"
LengthFactor="0.85"
Type="Bar"
KnobRadius="5"
KnobColor="White"
Value="{Binding PowerNow}"/>
</gauge:Scale.Pointers>
</gauge:Scale>
</gauge:SfCircularGauge.Scales>
<gauge:SfCircularGauge.Headers>
<gauge:Header Text="AC Power"
ForegroundColor="Black"/>
<gauge:Header Text="{Binding PowerNowString}"
ForegroundColor="Black"
Position="0.5, 0.8"/>
</gauge:SfCircularGauge.Headers>
</gauge:SfCircularGauge>
I get a slightly different error if I remove the last header in the gauge. I get this error:
Foundation.MonoTouchException: Objective-C exception thrown. Name: NSRangeException Reason: *** -[__NSArrayM objectAtIndex:]: index 0 beyond bounds for empty array