GroupViewsIOS.cs 954 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
using System;
using System.Collections.Generic;
using System.Linq;
using CoreGraphics;
using UIKit;
using Xamarin.Forms;
using Xamarin.Forms.Platform.iOS;
using XAMARINAggregateViews.iOS;

[assembly: Dependency(typeof(GroupViewsIOS))]
namespace XAMARINAggregateViews.iOS
{
    public class GroupViewsIOS : IGroupViews
    {
        public void aggregateViews(Layout<View> v)
        {
            
            UIView vista = v.GetRenderer().NativeView;
            
            var elements = new List<UIAccessibilityElement>();
            var nameElement = new UIAccessibilityElement(vista.Superview);

            var labels = vista.Subviews;

            foreach (UIView vi in labels)
            {
                var l = vi as UILabel;
                nameElement.AccessibilityLabel = "pippo";
            }

            nameElement.AccessibilityFrameInContainerSpace = vista.Frame;

            elements.Append(nameElement);

        }
    }
}