Unable to set availability id for UITableView on iOS

Not a big question, however, I ran into a dilemma. I am running some IOS UI tests and I cannot set the availability identifier needed for the platform for my UITableView.

This entire section does not seem to be present in the identity inspector in the interface constructor.

See attached screenshot.

Evil missing section

I tried to do this programmatically, but it did not work.

I set the availability identifier to be included and its value in viewDidLoad ()

override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view // set delegate and data source tableView.delegate = self; tableView.dataSource = self; // load the table Data tableData = ["Red", "Green", "Blue", "White", "Yellow"] // set accessibility identifier tableView.isAccessibilityElement = true tableView.accessibilityIdentifier = "tableView" } 

This is just an example application where I am testing the actual structure.

Any help is appreciated.

I am using Xcode 7.3.1

+5
source share
2 answers

Not an identifier, set accessibilityLabel, frameworks usually use

0
source

Try the following:

  tableView.accessibilityLabel = "My tableView label" tableView.isAccessibilityElement = true 

See accessibility for tableView for more tableView : Improve UITableView Availability

0
source

All Articles