I want to see the inner constructs of a special view on Mac, like the class name and hierarchy, etc.
On Windows, we can use the Spy app开发者_如何学Python for this purpose. Is there any app that works similarly for use on the Mac ?
Yes, you're looking for F-Script. Have a look at the F-Script injection service on the downloads page.
A little more abstractly, you can often use the Accessibility Inspector, which is one of the Developer Tools, for the same purposes. Its intended purpose is for testing your app's accessibility to disabled users, who may be using screen readers (such as VoiceOver) or other assistive software or hardware.
Of course, it won't be able to see into your custom views (if you have any) unless you've made them accessible.
精彩评论