I'm writing UI Tests for a document-based macOS app.
In a UI Test, how can I click on an NSToolbarTiem in a localization friendly way?
Recording doesn't record anything when I click on one.
NSToolbarItem doesn't seem to have an accessibilityIdentifier.
You should inspect elements tree print(app.debugDescription)
Find your element and click with something like app.toolbars["brushes"].firstMatch.click()
If accessibilityIdentifier and label are missing, add them in application code or storyboard.
Related
Why can the UI recording from Xcode accces elements like the status bar from CarPlay but not the other elements like the buttons on the map or buttons in an navigation alert?
XCTest built-in recorder is not designed to record interactions with CarPlay display properly.
You should probably inspect elements with an Accessibility Inspector or app.debugDescription
I need to scroll to top the main Interface Controller of an Apple Watch app programmatically after each launch specially if users has left the app after scrolling it down.
EDIT:
This is now possible in watchOS 4. Just use the scrollToObject:atScrollPosition:animated: method.
Unfortunately, this isn't currently possible. WatchKit only provides a method to scroll to the top of a WKInterfaceTable, not an entire interface controller.
The only workaround I've found is to hide every element in the interface controller. This doesn't just hide the element, it completely removes it from the controller. Then when you unhide everything, you'll be back at the top of your content.
I am trying to figure out how to detach a view from the main app. From what I can tell this is a supported feature in the RCP framework but I have not seen how to enable/disable the feature. Is there a property I can set somewhere in the View Hierarchy to enable this?
Just drag the view by its title tab out of the eclipse window, e.g. to a second screen, or make the eclipe window not beeing full sized.
I program one app for helping Spip users to do their loop for their "Squelette", and i would put a view with tab like Safari.
How do that, in a document-Based application. I have my window whith an NSTextView where we coding and a i would add a preview in a tab in the same window.
Thank's.
Try PSMTabBarControl.
I'm currently working on my first iOS application to run on the iPad, and I've come across a problem. I have been asked to implement menu's similar to the ones in the default applications such as when you click on the "Calendars" button in the top left of the calendars app.
Only issue is, I cant seem to find a standard UI object that looks like these, with the arrow connecting the menu to the button etc. Is this a standard UI component that I should be able to use, or will I have to imitate them by creating a custom object?
Thanks for any help.
That is a UIPopoverController. There isn't an Interface Builder control for this. You need to create one programmatically:
UIPopoverController *popover = [[UIPopoverController alloc]initWithContentViewController:someTableViewController];
See the documentation for more information and sample projects, specifically ToolbarSearch: