UI breaks when I update the class item


#1

I have a ListView with elements, when I click a button inside the item, they change a class of two StackLayouts, with that I make one visible and collapse the other.

For example:
I have two layouts

<StackLayout id="IDVisA" class="{{isVisA}}">
<image src="res://circle"/>
</StackLayout>
<StackLayout id="IDVisA" class="{{isVisA}}">
<image src="res://other"/>
</StackLayout>

If I click in the blue circle the first StackLayout collapses and the second is visible with other figure.

This works good with Android, but in iOS the UI doesn’t update, the layouts are invisible, only when I scroll down and return, they are good.

This is my code JS:

var customControl = args.object;
customControl.bindingContext = prodList;
var ajouter = customControl.parent.parent.getViewById("IDVisA");
var quantity = customControl.parent.parent.getViewById("IDVisB");
quantity.className="Visible";
ajouter.className="NotVisible";

What is the way to update the UI in the ListView? or is a bug?

With this method I can change the label contents.

Thanks