Skip to content

Commit

Permalink
Minor change to adhere to UIAccessibility docs. (#1060)
Browse files Browse the repository at this point in the history
Updated return value for the index(of:) function to be NSNotFound in
Platform+Accessibility's iOS section. This is as required by the
documentation for UIAccessibilityContainer protocol.
  • Loading branch information
mathewa6 committed Jun 29, 2018
1 parent a77b5ef commit 71f5c34
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/Charts/Utils/Platform+Accessibility.swift
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ extension NSUIView

open override func index(ofAccessibilityElement element: Any) -> Int
{
guard let axElement = element as? NSUIAccessibilityElement else { return -1 }
return (accessibilityChildren() as? [NSUIAccessibilityElement])?.index(of: axElement) ?? -1
guard let axElement = element as? NSUIAccessibilityElement else { return NSNotFound }
return (accessibilityChildren() as? [NSUIAccessibilityElement])?.index(of: axElement) ?? NSNotFound
}
}

Expand Down

0 comments on commit 71f5c34

Please sign in to comment.