Q:

Change label text color when sliding between views

Hi. Im trying to achieve whats seen on the picture above.
Basically it's a UICollectionView with 3 cells, each containging a label. What I'm trying to achieve is having the black view that lays on top of the selected label/view change text color based on the overlaying views position. So when swiping the view that is underneath the color of the label should gradually change color when the black view is leaveing the text area. 
I've managed to do a similar thing but with an underlaying line that shows the active view like so:

I'm doing this in Xamarin.iOS but I'm happy with Swift solutions/hints if anyone has an idea of solving this.
Sidenote: I'm not using storyboards nor interfacebuilder. Code only to create my interface. Also, since the sizes of the labels vary the view needs to shrink/expand to fit the labels.
Thanks!
Edit: Source code for the current solution I have.
public class HomeMenuBar : UIView
{
    UICollectionView _menuLabels;
    public HomeController HomeController { get; set; }
    public int val;
    public UICollectionView MenuLabels
    {
        get
        {
            if (_menuLabels != null) return _menuLabels;
            var layout = new UICollectionViewFlowLayout();
            _menuLabels = new UICollectionView(CGRect.Empty, layout);
            _menuLabels.BackgroundColor = UIColor.White;

            var del = new MenuLabelsFlowDelegate();
            _menuLabels.DataSource = new MenuLabelsDataSource();

            del.ItemSelectedEvent += (object sender, EventArgs e) =>
            {
                HomeController.ScrollToMenuItem(((MenuLabelsFlowDelegate)sender).selectedIndex);
            };

            _menuLabels.Delegate = del;
            return _menuLabels;
        }
    }
    private string _cellId = "cellId";

    [Export("initWithFrame:")]
    public HomeMenuBar(CGRect frame) : base(frame)
    {

    }

    public HomeMenuBar()
    {
        MenuLabels.RegisterClassForCell(typeof(MenuCell), _cellId);

        AddSubview(MenuLabels);

        this.ConstraintsWithFormat("H:|[v0]|", MenuLabels);
        this.ConstraintsWithFormat("V:|[v0]|", MenuLabels);

        var indexPath = NSIndexPath.FromItemSection(0, 0);
        MenuLabels.SelectItem(indexPath, false, UICollectionViewScrollPosition.None);

        SetupHighlitnigBar();
    }

    private UIView _menuItemHighlitghterBar;
    public NSLayoutConstraint BarLeftrAnchorConstraint { get; set; }
    public UIView MenuItemHighlitghterBar
    {
        get
        {
            if (_menuItemHighlitghterBar != null) return _menuItemHighlitghterBar;

            _menuItemHighlitghterBar = new UIView
            {
                BackgroundColor = UIColor.Black,
                TranslatesAutoresizingMaskIntoConstraints = false
            };

            return _menuItemHighlitghterBar;
        }
    }

    void SetupHighlitnigBar()
    {

        AddSubview(MenuItemHighlitghterBar);

        var width = UIApplication.SharedApplication.StatusBarFrame.Width / 3;
        this.ConstraintsWithFormat($"H:|[v0({width})]", MenuItemHighlitghterBar);
        this.ConstraintsWithFormat("V:[v0(2)]|", MenuItemHighlitghterBar);

        BarLeftrAnchorConstraint = _menuItemHighlitghterBar.LeftAnchor.ConstraintEqualTo(this.LeftAnchor);
        BarLeftrAnchorConstraint.Active = true;

    }

}

public class MenuLabelsDataSource : UICollectionViewDataSource
{
    string[] _labelText = { "Explore", "Following", "Likes" };

    public override UICollectionViewCell GetCell(UICollectionView collectionView, NSIndexPath indexPath)
    {
        var cell = (MenuCell)collectionView.DequeueReusableCell("cellId", indexPath);

        cell.ConstructLabelWithText(_labelText[indexPath.Item]);

        return cell;
    }

    public override nint GetItemsCount(UICollectionView collectionView, nint section)
    {
        return 3;
    }

}

public class MenuLabelsFlowDelegate : UICollectionViewDelegateFlowLayout
{

    public event EventHandler<EventArgs> ItemSelectedEvent;
    public int selectedIndex = 0;

    public override CGSize GetSizeForItem(UICollectionView collectionView, UICollectionViewLayout layout, NSIndexPath indexPath)
    {
        return new CGSize(collectionView.Frame.Width / 3, collectionView.Frame.Height);
    }

    public override nfloat GetMinimumInteritemSpacingForSection(UICollectionView collectionView, UICollectionViewLayout layout, nint section)
    {
        return 0;

    }

    public override void ItemSelected(UICollectionView collectionView, NSIndexPath indexPath)
    {
        this.selectedIndex = (int)indexPath.Item;
        if (this.ItemSelectedEvent != null)
        {
            this.ItemSelectedEvent(this, new EventArgs());
        }
    }

}

public class MenuCell : UICollectionViewCell
{

    UILabel _label;

    public UILabel Label
    {
        get
        {
            if (_label != null) return _label;

            _label = new UILabel();

            return _label;
        }
    }

    [Export("initWithFrame:")]
    public MenuCell(CGRect frame) : base(frame)
    {

    }

    public void ConstructLabelWithText(string text)
    {
        AddSubview(Label);

        this.ConstraintsWithFormat("H:|-4-[v0]-4-|", Label);
        this.ConstraintsWithFormat("V:|-4-[v0]-4-|", Label);

        Label.Text = text;
        Label.TextAlignment = UITextAlignment.Center;

    }

}

A:

You can add a property when it changes(e.g. your swipe action fires), modify the cell's label.
At first I recommend you to configure the Label in the cell's construction method:
[Export("initWithFrame:")]
public MenuCell(CGRect frame) : base(frame)
{
    AddSubview(Label);

    Label.TranslatesAutoresizingMaskIntoConstraints = false;
    this.ConstraintsWithFormat("H:|-4-[v0]-4-|", Label);
    this.ConstraintsWithFormat("V:|-4-[v0]-4-|", Label);

    //Try to configure the label's style
    Label.Layer.CornerRadius = 10;
    Label.Layer.MasksToBounds = true;

    Label.TextAlignment = UITextAlignment.Center;
} 

Then define two method for the two selection styles:
public void LabelSelected()
{
    Label.BackgroundColor = UIColor.Black;
    Label.TextColor = UIColor.White;
}

public void LabelUnSelected()
{
    Label.BackgroundColor = UIColor.White;
    Label.TextColor = UIColor.Black;
}

Add a CollectionSelected in the DataSource:
public class MenuLabelsDataSource : UICollectionViewDataSource
{
    ...

    public int CollectionSelected { set; get; }

    public override UICollectionViewCell GetCell(UICollectionView collectionView, NSIndexPath indexPath)
    {
        var cell = (MenuCell)collectionView.DequeueReusableCell("cellId", indexPath);

        if (indexPath.Row == CollectionSelected) 
        {
            cell.LabelSelected();
        }
        else 
        {
            cell.LabelUnSelected();
        }

        //This method only sets the text of the label
        cell.ConstructLabelWithText(_labelText[indexPath.Item]);

        return cell;
    }

    ...

}

At last we need to define the property in the HomeMenuBar:
public int SelectedIndex
{
    set
    {
        selectedIndex = value;

        (_menuLabels.DataSource as MenuLabelsDataSource).CollectionSelected = selectedIndex;
        _menuLabels.ReloadData();
    }
}

When you want to change the selected index, try homeMenu.SelectedIndex = 1;. The homeMenu is an instance of HomeMenuBar.

