Commit 6546694b authored by Paolo Pecis's avatar Paolo Pecis

Added Xamarin code for iOS

parent 62cb5c5a
<Properties StartupConfiguration="{B0A427EE-702C-4B88-B9C7-4B4D3BCF8F4F}|Default">
<MonoDevelop.Ide.Workbench ActiveDocument="CustomViewAccessibility/App.xaml.cs">
<MonoDevelop.Ide.Workbench ActiveDocument="CustomViewAccessibility.iOS/Info.plist">
<Files>
<File FileName="CustomViewAccessibility/MainPage.xaml" Line="3" Column="72" />
<File FileName="CustomViewAccessibility/MainPage.xaml.cs" Line="14" Column="45" />
<File FileName="CustomViewAccessibility.Android/AndroidAccessibleButton.cs" Line="44" Column="3" />
<File FileName="CustomViewAccessibility.iOS/IOSAccessibleButton.cs" Line="38" Column="3" />
<File FileName="CustomViewAccessibility/MainPage.xaml.cs" Line="18" Column="31" />
<File FileName="CustomViewAccessibility.Android/AndroidAccessibleButton.cs" Line="56" Column="60" />
<File FileName="CustomViewAccessibility.iOS/IOSAccessibleButton.cs" />
<File FileName="CustomViewAccessibility/IAccessibleButton.cs" />
<File FileName="CustomViewAccessibility.iOS/Info.plist" />
<File FileName="CustomViewAccessibility.iOS/AppDelegate.cs" Line="28" Column="1" />
<File FileName="CustomViewAccessibility.iOS/AppDelegate.cs" />
<File FileName="CustomViewAccessibility/App.xaml.cs" Line="13" Column="57" />
</Files>
<Pads>
......@@ -18,13 +18,13 @@
<Node name="Dependencies" expanded="True">
<Node name="PackageDependencies" expanded="True" />
</Node>
<Node name="App.xaml" expanded="True">
<Node name="App.xaml.cs" selected="True" />
</Node>
<Node name="App.xaml" expanded="True" />
<Node name="MainPage.xaml" expanded="True" />
</Node>
<Node name="CustomViewAccessibility.Android" expanded="True" />
<Node name="CustomViewAccessibility.iOS" expanded="True" />
<Node name="CustomViewAccessibility.iOS" expanded="True">
<Node name="Info.plist" selected="True" />
</Node>
</Node>
</State>
</Pad>
......
......@@ -53,7 +53,7 @@ namespace CustomViewAccessibility.Droid
if (e.EventType == EventTypes.ViewAccessibilityFocused)
{
this.SetBackgroundColor(Android.Graphics.Color.Green);
this.Text = "I AM IN FOCUS";
this.Text = "I have the accessibility focus";
Console.WriteLine("ACCESSIBILITY I am in focus");
}
else if (e.EventType == EventTypes.ViewAccessibilityFocusCleared)
......
......@@ -26,7 +26,7 @@
<MtouchArch>x86_64</MtouchArch>
<MtouchLink>None</MtouchLink>
<MtouchDebug>true</MtouchDebug>
<CodesignProvision>iOS Team Provisioning Profile: com.example.iOSCustomAction1</CodesignProvision>
<CodesignProvision>iOS Team Provisioning Profile: com.example.XAMARINAccessibleView</CodesignProvision>
<CodesignKey>Apple Development: paolo.pecis@gmail.com (8N32384RK9)</CodesignKey>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
......
......@@ -45,7 +45,7 @@ namespace CustomViewAccessibility.iOS
{
base.AccessibilityElementDidBecomeFocused();
this.BackgroundColor = UIColor.Green;
this.SetTitle("I AM IN FOCUS", UIControlState.Normal);
this.SetTitle("I have the accessibility focus", UIControlState.Normal);
Console.WriteLine("ACCESSIBILITY I am in focus");
}
......
......@@ -25,7 +25,7 @@
<key>CFBundleDisplayName</key>
<string>CustomViewAccessibility</string>
<key>CFBundleIdentifier</key>
<string>com.example.iOSCustomAction1</string>
<string>com.example.XAMARINAccessibleView</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>UILaunchStoryboardName</key>
......
......@@ -11,11 +11,11 @@ namespace CustomViewAccessibility
public MainPage()
{
InitializeComponent();
Title = "XAMARINAccessibleView";
Title = "Xamarin accessibility events";
Button notAccessibleButton = new Button
{
Text = "USELESS BUTTON",
Text = "Button 1",
BackgroundColor = Color.LightGray,
};
stacklayout.Children.Add(notAccessibleButton);
......
<Properties StartupConfiguration="{0CAD827B-E24A-4C29-B01C-D9C767415DB5}|Default">
<Properties StartupConfiguration="{C8A7AAF2-CD9D-40F1-8C91-8C061BBC3A5C}|Default">
<MonoDevelop.Ide.ItemProperties.XAMARINAggregateViews.iOS automaticSigning="False" PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.a0e5d005d2a40304c7f69660b3e0435054a9bcff" />
<MonoDevelop.Ide.ItemProperties.XAMARINAggregateViews.Android AndroidDesignerPreferredTheme="Theme.AppCompat.Light.NoActionBar" PreferredExecutionTarget="Android.galaxy_s9" />
<MonoDevelop.Ide.Workbench ActiveDocument="XAMARINAggregateViews.iOS/Info.plist">
<MonoDevelop.Ide.Workbench ActiveDocument="XAMARINAggregateViews/MainPage.xaml.cs">
<Files>
<File FileName="XAMARINAggregateViews/MainPage.xaml" Line="4" Column="1" />
<File FileName="XAMARINAggregateViews/MainPage.xaml.cs" Line="115" Column="19" />
<File FileName="XAMARINAggregateViews/IGroupViews.cs" Line="9" Column="6" />
<File FileName="XAMARINAggregateViews.iOS/GroupViewsIOS.cs" Line="34" Column="1" />
<File FileName="XAMARINAggregateViews/MainPage.xaml.cs" Line="44" Column="14" />
<File FileName="XAMARINAggregateViews/IGroupViews.cs" />
<File FileName="XAMARINAggregateViews.iOS/GroupViewsIOS.cs" />
<File FileName="XAMARINAggregateViews.iOS/Info.plist" />
</Files>
<Pads>
......@@ -17,11 +17,11 @@
<Node name="Dependencies" expanded="True">
<Node name="PackageDependencies" expanded="True" />
</Node>
<Node name="MainPage.xaml" expanded="True" />
</Node>
<Node name="XAMARINAggregateViews.iOS" expanded="True">
<Node name="Info.plist" selected="True" />
<Node name="MainPage.xaml" expanded="True">
<Node name="MainPage.xaml.cs" selected="True" />
</Node>
</Node>
<Node name="XAMARINAggregateViews.iOS" expanded="True" />
</Node>
</State>
</Pad>
......
......@@ -30,6 +30,7 @@ namespace XAMARINAggregateViews
Padding = 10,
};
background.Children.Add(separateElements);
AutomationProperties.SetIsInAccessibleTree(separateElements, false);
//here I create the single separated views
sep1 = new Label
......@@ -65,8 +66,10 @@ namespace XAMARINAggregateViews
HeightRequest = 150,
Padding = 10,
};
AutomationProperties.SetIsInAccessibleTree(aggregateElements, true);
//the container that aggregates the views has to be accessible, setting his "AutomationProperties.IsInAccessibleTree" property to true
if(Device.RuntimePlatform == Device.Android)
if (Device.RuntimePlatform == Device.Android)
{
AutomationProperties.SetIsInAccessibleTree(aggregateElements, true);
}
......@@ -80,27 +83,26 @@ namespace XAMARINAggregateViews
BackgroundColor = Color.Orange,
HeightRequest = 40,
};
AutomationProperties.SetIsInAccessibleTree(agg1, false);
agg2 = new Label
{
Text = "Aggregated label 2",
BackgroundColor = Color.Orange,
HeightRequest = 40,
};
AutomationProperties.SetIsInAccessibleTree(agg2, false);
agg3 = new Label
{
Text = "Aggregated label 3",
BackgroundColor = Color.Orange,
HeightRequest = 40,
};
AutomationProperties.SetIsInAccessibleTree(agg3, false);
aggregateElements.Children.Add(agg1);
aggregateElements.Children.Add(agg2);
aggregateElements.Children.Add(agg3);
if (Device.RuntimePlatform == Device.iOS)
{
//groupAccessibleItems(aggregateElements);
}
}
private void groupAccessibleItems(Layout container)
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>iOSAggregateViews.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
</dict>
</plist>
......@@ -3,20 +3,16 @@
<Files>
<File FileName="XAMARINChangeFocus/MainPage.xaml" Line="5" Column="1" />
<File FileName="XAMARINChangeFocus/MainPage.xaml.cs" Line="17" Column="35" />
<File FileName="XAMARINChangeFocus/IChangeFocusService.cs" Line="1" Column="1" />
<File FileName="XAMARINChangeFocus/IChangeFocusService.cs" />
<File FileName="XAMARINChangeFocus.iOS/IosFocusChange.cs" />
<File FileName="XAMARINChangeFocus.Android/AndroidFocusChange.cs" Line="15" Column="84" />
<File FileName="XAMARINChangeFocus.Android/AndroidFocusChange.cs" />
<File FileName="XAMARINChangeFocus.iOS/Info.plist" />
</Files>
<Pads>
<Pad Id="ProjectPad">
<State name="__root__">
<Node name="XAMARINChangeFocus" expanded="True">
<Node name="XAMARINChangeFocus" expanded="True">
<Node name="MainPage.xaml" expanded="True">
<Node name="MainPage.xaml.cs" selected="True" />
</Node>
</Node>
<Node name="XAMARINChangeFocus" expanded="True" />
<Node name="XAMARINChangeFocus.Android" expanded="True" />
<Node name="XAMARINChangeFocus.iOS" expanded="True" />
</Node>
......
......@@ -285,14 +285,14 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 4EN39QDU46;
DEVELOPMENT_TEAM = SSDAG7GZA8;
INFOPLIST_FILE = iOSCustomAction/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.example.iOSCustomAction;
PRODUCT_BUNDLE_IDENTIFIER = com.example.XAMARINAccessibleView;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
......@@ -304,14 +304,14 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = 4EN39QDU46;
DEVELOPMENT_TEAM = SSDAG7GZA8;
INFOPLIST_FILE = iOSCustomAction/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.example.iOSCustomAction;
PRODUCT_BUNDLE_IDENTIFIER = com.example.XAMARINAccessibleView;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>iOSCustomAction.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
</dict>
</plist>
......@@ -2,7 +2,7 @@
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16096" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16086"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
......
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:IOSDescribedByView.xcodeproj">
</FileRef>
</Workspace>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>IOSDescribedByView.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
</dict>
</plist>
//
// AppDelegate.swift
// IOSDescribedByView
//
// Created by Paolo Pecis on 30/04/2020.
// Copyright © 2020 Paolo Pecis. All rights reserved.
//
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
return true
}
// MARK: UISceneSession Lifecycle
func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
// Called when a new scene session is being created.
// Use this method to select a configuration to create the new scene with.
return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
}
func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) {
// Called when the user discards a scene session.
// If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
// Use this method to release any resources that were specific to the discarded scenes, as they will not return.
}
}
{
"images" : [
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "20x20"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "20x20"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "29x29"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "29x29"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "40x40"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "40x40"
},
{
"idiom" : "iphone",
"scale" : "2x",
"size" : "60x60"
},
{
"idiom" : "iphone",
"scale" : "3x",
"size" : "60x60"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "20x20"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "20x20"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "29x29"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "29x29"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "40x40"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "40x40"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "76x76"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "76x76"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "83.5x83.5"
},
{
"idiom" : "ios-marketing",
"scale" : "1x",
"size" : "1024x1024"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" xcode11CocoaTouchSystemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
</document>
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="ViewController" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" xcode11CocoaTouchSystemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
</scene>
</scenes>
</document>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
<false/>
<key>UISceneConfigurations</key>
<dict>
<key>UIWindowSceneSessionRoleApplication</key>
<array>
<dict>
<key>UISceneConfigurationName</key>
<string>Default Configuration</string>
<key>UISceneDelegateClassName</key>
<string>$(PRODUCT_MODULE_NAME).SceneDelegate</string>
<key>UISceneStoryboardFile</key>
<string>Main</string>
</dict>
</array>
</dict>
</dict>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
//
// SceneDelegate.swift
// IOSDescribedByView
//
// Created by Paolo Pecis on 30/04/2020.
// Copyright © 2020 Paolo Pecis. All rights reserved.
//
import UIKit
class SceneDelegate: UIResponder, UIWindowSceneDelegate {
var window: UIWindow?
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
// Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`.
// If using a storyboard, the `window` property will automatically be initialized and attached to the scene.
// This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead).
guard let _ = (scene as? UIWindowScene) else { return }
}
func sceneDidDisconnect(_ scene: UIScene) {
// Called as the scene is being released by the system.
// This occurs shortly after the scene enters the background, or when its session is discarded.
// Release any resources associated with this scene that can be re-created the next time the scene connects.
// The scene may re-connect later, as its session was not neccessarily discarded (see `application:didDiscardSceneSessions` instead).
}
func sceneDidBecomeActive(_ scene: UIScene) {
// Called when the scene has moved from an inactive state to an active state.
// Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive.
}
func sceneWillResignActive(_ scene: UIScene) {
// Called when the scene will move from an active state to an inactive state.
// This may occur due to temporary interruptions (ex. an incoming phone call).
}
func sceneWillEnterForeground(_ scene: UIScene) {
// Called as the scene transitions from the background to the foreground.
// Use this method to undo the changes made on entering the background.
}
func sceneDidEnterBackground(_ scene: UIScene) {
// Called as the scene transitions from the foreground to the background.
// Use this method to save data, release shared resources, and store enough scene-specific state information
// to restore the scene back to its current state.
}
}
//
// ViewController.swift
// IOSDescribedByView
//
// Created by Paolo Pecis on 30/04/2020.
// Copyright © 2020 Paolo Pecis. All rights reserved.
//
import UIKit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
}
}
<Properties StartupConfiguration="{19BEA79B-B682-4213-90DE-8ACD91C8C688}|Default">
<MonoDevelop.Ide.ItemProperties.XAMARINDescribedByView.Android PreferredExecutionTarget="Android.23e46ec8990c7ece" />
<MonoDevelop.Ide.ItemProperties.XAMARINDescribedByView.iOS FirstBuild="True" />
<MonoDevelop.Ide.Workbench ActiveDocument="XAMARINDescribedByView/MainPage.xaml.cs">
<Properties StartupConfiguration="{52A8E1CA-DD91-44BC-AA60-4144B25CD7A8}|Default">
<MonoDevelop.Ide.ItemProperties.XAMARINDescribedByView.Android PreferredExecutionTarget="Android.galaxy_s9" />
<MonoDevelop.Ide.ItemProperties.XAMARINDescribedByView.iOS automaticSigning="False" PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.a0e5d005d2a40304c7f69660b3e0435054a9bcff" />
<MonoDevelop.Ide.Workbench ActiveDocument="XAMARINDescribedByView.iOS/Info.plist">
<Files>
<File FileName="XAMARINDescribedByView/MainPage.xaml" Line="4" Column="1" />
<File FileName="XAMARINDescribedByView/MainPage.xaml.cs" Line="39" Column="118" />
<File FileName="XAMARINDescribedByView/MainPage.xaml" Line="6" Column="15" />
<File FileName="XAMARINDescribedByView/MainPage.xaml.cs" Line="43" Column="67" />
<File FileName="XAMARINDescribedByView.iOS/Info.plist" />
</Files>
<Pads>
<Pad Id="ProjectPad">
<State name="__root__">
<Node name="XAMARINDescribedByView" expanded="True">
<Node name="XAMARINDescribedByView" expanded="True">
<Node name="MainPage.xaml" expanded="True">
<Node name="MainPage.xaml.cs" selected="True" />
<Node name="Dependencies" expanded="True">
<Node name="PackageDependencies" expanded="True" />
</Node>
<Node name="MainPage.xaml" expanded="True" />
</Node>
<Node name="XAMARINDescribedByView.iOS" expanded="True">
<Node name="Info.plist" selected="True" />
</Node>
</Node>
</State>
......@@ -21,7 +26,7 @@
</Pads>
</MonoDevelop.Ide.Workbench>
<MonoDevelop.Ide.DebuggingService.PinnedWatches />
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" />
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|iPhone" />
<MonoDevelop.Ide.DebuggingService.Breakpoints>
<BreakpointStore />
</MonoDevelop.Ide.DebuggingService.Breakpoints>
......
......@@ -53,8 +53,8 @@
<Reference Include="System.Numerics.Vectors" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Forms" Version="4.4.0.991265" />
<PackageReference Include="Xamarin.Essentials" Version="1.3.1" />
<PackageReference Include="Xamarin.Forms" Version="4.5.0.657" />
<PackageReference Include="Xamarin.Essentials" Version="1.5.3.1" />
</ItemGroup>
<ItemGroup>
<Compile Include="MainActivity.cs" />
......
......@@ -2,37 +2,37 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>UIDeviceFamily</key>
<array>
<integer>1</integer>
<integer>2</integer>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>MinimumOSVersion</key>
<string>8.0</string>
<key>CFBundleDisplayName</key>
<string>XAMARINDescribedByView</string>
<key>CFBundleIdentifier</key>
<string>com.companyname.XAMARINDescribedByView</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>CFBundleName</key>
<string>XAMARINDescribedByView</string>
<key>XSAppIconAssets</key>
<string>Assets.xcassets/AppIcon.appiconset</string>
<key>UIDeviceFamily</key>
<array>
<integer>1</integer>
<integer>2</integer>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>MinimumOSVersion</key>
<string>8.0</string>
<key>CFBundleDisplayName</key>
<string>XAMARINDescribedByView</string>
<key>CFBundleIdentifier</key>
<string>com.companyname.IOSDescribedByView</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>CFBundleName</key>
<string>XAMARINDescribedByView</string>
<key>XSAppIconAssets</key>
<string>Assets.xcassets/AppIcon.appiconset</string>
</dict>
</plist>
......@@ -46,11 +46,12 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<MtouchArch>ARM64</MtouchArch>
<CodesignKey>iPhone Developer</CodesignKey>
<CodesignKey>Apple Development: paolo.pecis@gmail.com (8N32384RK9)</CodesignKey>
<MtouchDebug>true</MtouchDebug>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
<MtouchLink>None</MtouchLink>
<MtouchInterpreter>-all</MtouchInterpreter>
<CodesignProvision>iOS Team Provisioning Profile: com.companyname.IOSDescribedByView</CodesignProvision>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
<DebugType>none</DebugType>
......@@ -123,8 +124,8 @@
<Reference Include="System.Numerics.Vectors" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Forms" Version="4.4.0.991265" />
<PackageReference Include="Xamarin.Essentials" Version="1.3.1" />
<PackageReference Include="Xamarin.Forms" Version="4.5.0.657" />
<PackageReference Include="Xamarin.Essentials" Version="1.5.3.1" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
<ItemGroup>
......
......@@ -31,13 +31,18 @@ namespace XAMARINDescribedByView
AutomationProperties.SetIsInAccessibleTree(label1, true);
background.Children.Add(label1);
entry1 = new Entry
{
BackgroundColor = Color.Orange,
HeightRequest = 50,
};
AutomationProperties.SetLabeledBy(entry1, label1); //the view "entry1" will be described by view "label1"
entry1 = new Entry();
background.Children.Add(entry1);
AutomationProperties.SetIsInAccessibleTree(entry1, true);
//This work only for Android
AutomationProperties.SetLabeledBy(entry1, label1); //the view "entry1" will be described by view "label1"
//For iOS manually set the Accessibility Description of entry1 equal to the text of label1
if(Device.RuntimePlatform == Device.iOS)
{
AutomationProperties.SetName(entry1, label1.Text);
}
}
}
......
......@@ -11,7 +11,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Forms" Version="4.4.0.991265" />
<PackageReference Include="Xamarin.Essentials" Version="1.3.1" />
<PackageReference Include="Xamarin.Forms" Version="4.5.0.657" />
<PackageReference Include="Xamarin.Essentials" Version="1.5.3.1" />
</ItemGroup>
</Project>
\ No newline at end of file
<Properties StartupConfiguration="{C5A8BFFE-BF7F-4AC8-8BFB-64555A7CA0CF}|Default">
<MonoDevelop.Ide.Workbench ActiveDocument="XAMARINHeadingNavigations.Android/AccessibilityHeadingAndroid.cs">
<MonoDevelop.Ide.Workbench ActiveDocument="XAMARINHeadingNavigations/MainPage.xaml.cs">
<Files>
<File FileName="XAMARINHeadingNavigations/MainPage.xaml" Line="1" Column="35" />
<File FileName="XAMARINHeadingNavigations/MainPage.xaml.cs" Line="53" Column="1" />
<File FileName="XAMARINHeadingNavigations/IAccessibilityHeading.cs" Line="8" Column="33" />
<File FileName="XAMARINHeadingNavigations/IAccessibilityHeading.cs" />
<File FileName="XAMARINHeadingNavigations.Android/AccessibilityHeadingAndroid.cs" Line="8" Column="1" />
</Files>
<Pads>
......@@ -11,11 +11,11 @@
<State name="__root__">
<Node name="XAMARINHeadingNavigations" expanded="True">
<Node name="XAMARINHeadingNavigations" expanded="True">
<Node name="MainPage.xaml" expanded="True" />
</Node>
<Node name="XAMARINHeadingNavigations.Android" expanded="True">
<Node name="AccessibilityHeadingAndroid.cs" selected="True" />
<Node name="MainPage.xaml" expanded="True">
<Node name="MainPage.xaml.cs" selected="True" />
</Node>
</Node>
<Node name="XAMARINHeadingNavigations.Android" expanded="True" />
</Node>
</State>
</Pad>
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>iOSHeadingsNavigation.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
</dict>
</plist>
......@@ -2,7 +2,7 @@
<MonoDevelop.Ide.Workbench ActiveDocument="XAMARINHideFocus/MainPage.xaml.cs">
<Files>
<File FileName="XAMARINHideFocus/MainPage.xaml" Line="3" Column="37" />
<File FileName="XAMARINHideFocus/MainPage.xaml.cs" Line="58" Column="48" />
<File FileName="XAMARINHideFocus/MainPage.xaml.cs" Line="58" Column="46" />
</Files>
<Pads>
<Pad Id="ProjectPad">
......@@ -12,16 +12,13 @@
<Node name="Dependencies" expanded="True">
<Node name="PackageDependencies" expanded="True" />
</Node>
<Node name="MainPage.xaml" expanded="True">
<Node name="MainPage.xaml.cs" selected="True" />
</Node>
</Node>
</Node>
</State>
</Pad>
</Pads>
</MonoDevelop.Ide.Workbench>
<MonoDevelop.Ide.ItemProperties.XAMARINHideFocus.Android PreferredExecutionTarget="Android.23e46ec8990c7ece" />
<MonoDevelop.Ide.ItemProperties.XAMARINHideFocus.Android PreferredExecutionTarget="Android.galaxy_s9" />
<MonoDevelop.Ide.DebuggingService.PinnedWatches />
<MonoDevelop.Ide.ItemProperties.XAMARINHideFocus.iOS FirstBuild="True" />
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" />
......
......@@ -15,7 +15,7 @@ namespace XAMARINHideFocus.Droid
{
[System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "1.0.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "1.0.0.0")]
public partial class Resource
{
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment