From a0f526abc914ec548b2880edeaa47c16faab2a23 Mon Sep 17 00:00:00 2001 From: Jared Friese Date: Sun, 19 Apr 2020 08:28:31 +1000 Subject: [PATCH] Add documentation for UINavigationBar extensions --- Documentation/UINavigationBar.md | 12 ++++++++++++ README.md | 1 + 2 files changed, 13 insertions(+) create mode 100644 Documentation/UINavigationBar.md diff --git a/Documentation/UINavigationBar.md b/Documentation/UINavigationBar.md new file mode 100644 index 0000000..35dee9a --- /dev/null +++ b/Documentation/UINavigationBar.md @@ -0,0 +1,12 @@ +# UINavigationBar + +## Methods +`public func tapTopItem(withTitle title: String)` + +Searches the `topItem` of a navigation bar for an item with a +title equal to the parameter `title`. If found, it fires the action +associated with that item. + +Raises a `FleetError` if a navigation bar item with the given title +cannot be found, if there in the are no items in the navigation bar, +or if the item's action is not properly set up. diff --git a/README.md b/README.md index e13afe1..01444e7 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,7 @@ Fleet extends UIKit classes in order to make it easier to test your code's inter - [UIBarButtonItem](./Documentation/UIBarButtonItem.md) - Provides convenience methods similar to those provided for UIButton. - [UIAlertController](./Documentation/UIAlertController.md) - Allows specs to simply tap on alert actions in order to test their behavior. - [UITabBarController](./Documentation/UITabBarController.md) - Provides convenience methods for selecting tabs. +- [UINavigationBar](./Documentation/UINavigationBar.md) - Tap on items in a navigation bar. - [UITextField](./Documentation/UITextField.md) - Provides convenience methods for entering text. (iOS-only) - [UISwitch](./Documentation/UISwitch.md) - Provides convenience methods for interacting with switches in test. (iOS-only) - [UITextView](./Documentation/UITextView.md) - Provides convenience methods for entering text into a text view. (iOS-only)