1

In the Repl I ran a query for "1" which is the current badge number on a tab.

This returned the below query, which you can see has the class _UIBadgeView.

However when I run a query for _UIBadgeView I get nothing.

I tried both app.Query("_UIBadgeView"); and app.Query(c => c.Class("_UIBadgeView"));

Any ideas how I can access the badge view?

{
Id => null,
Description => "<_UIBadgeView: 0x7e5cd380; frame = (49.5 2; 18 18); text = '1'; userInteractionEnabled = NO; layer = <CALayer: 0x7e5cceb0>>", Rect => {Width => 18, Height => 18, X => 145.5, Y => 621, CenterX => 154.5, CenterY => 630
},
Label => "1",
Text => "1",
Class => "_UIBadgeView",
Enabled => false
}
4

1 回答 1

1

这并不明显,可能是一个错误,但下划线不被视为大写字符。使用下划线开头的 iOS 类名来ClassFull代替。Class

对于 iOS(第一个字符小写):具有给定值的类(或超类)名称以“UI”开头的元素。示例:按钮变为 UIButton。对于 iOS(第一个字符大写):具有给定值的类(或超类)名称的元素。

应用查询类

对于 iOS:具有给定值的类(或超类)名称的元素。

AppQuery.ClassFull

于 2017-06-23T15:54:06.243 回答