Interface UINavigationItemRenameDelegate

    • Method Detail

      • navigationItemDidEndRenamingWithTitle

        void navigationItemDidEndRenamingWithTitle​(@NotNull
                                                   @NotNull UINavigationItem navigationItem,
                                                   @NotNull
                                                   @NotNull java.lang.String title)
        This method is called when renaming has ended. The title on the navigation item has already been changed when this method is called but clients can make further adjustments to it when necessary.
      • navigationItemShouldEndRenamingWithTitle

        default boolean navigationItemShouldEndRenamingWithTitle​(@NotNull
                                                                 @NotNull UINavigationItem navigationItem,
                                                                 @NotNull
                                                                 @NotNull java.lang.String title)
        This method can be used to prevent renaming from happening. However there are cases (e.g. when a new navigation item is pushed on the navigation bar) where this method will not be called and instead navigationItem:didEndRenamingWithTitle: is called right away. Clients are therefore expected to handle titles in navigationItem:didEndRenamingWithTitle: for which they would return NO from navigationItem:shouldEndRenamingWithTitle:.
      • navigationItemWillBeginRenamingWithSuggestedTitleSelectedRange

        @NotNull
        default @NotNull java.lang.String navigationItemWillBeginRenamingWithSuggestedTitleSelectedRange​(@NotNull
                                                                                                         @NotNull UINavigationItem navigationItem,
                                                                                                         @NotNull
                                                                                                         @NotNull java.lang.String title,
                                                                                                         @NotNull
                                                                                                         @NotNull NSRange selectedRange)
        Called when we begin renaming. Implementing this method allows for customizing the initial text that will show up in the text field as well as the selected range of that text.
      • navigationItemShouldBeginRenaming

        default boolean navigationItemShouldBeginRenaming​(@NotNull
                                                          @NotNull UINavigationItem navigationItem)
        Controls whether the rename action is supported for the given navigation item. For example this method is called when the navigation bar's document menu is shown to validate if the rename action should be part of that menu.