iOSHasFocus.cs 422 Bytes
Newer Older
Mattia's avatar
Mattia committed
1 2 3 4
using System;
using UIKit;
using Xamarin.Forms;
using Xamarin.Forms.Platform.iOS;
Mattia's avatar
Mattia committed
5 6 7
using fun5.iOS;
using System.Threading.Tasks;
using SampleApp.DependencyServices;
Mattia's avatar
Mattia committed
8

Mattia's avatar
Mattia committed
9 10
[assembly: Dependency(typeof(iOSFocus))]
namespace fun5.iOS
Mattia's avatar
Mattia committed
11
{
Mattia's avatar
Mattia committed
12
    public class iOSFocus : IIsFocused
Mattia's avatar
Mattia committed
13
    {
Mattia's avatar
Mattia committed
14

Mattia's avatar
Mattia committed
15
        public bool isFocused(View v)
Mattia's avatar
Mattia committed
16
        {
Mattia's avatar
Mattia committed
17
            return v.GetRenderer().NativeView.AccessibilityElementIsFocused();
Mattia's avatar
Mattia committed
18 19
        }

Mattia's avatar
Mattia committed
20 21
    }
}