diff --git a/ios/src/ReactNative/RNIContextMenu/RNIMenuActionItem.swift b/ios/src/ReactNative/RNIContextMenu/RNIMenuActionItem.swift index f7d24c5e..2208a37e 100644 --- a/ios/src/ReactNative/RNIContextMenu/RNIMenuActionItem.swift +++ b/ios/src/ReactNative/RNIContextMenu/RNIMenuActionItem.swift @@ -153,11 +153,7 @@ extension RNIMenuActionItem { typealias ActionItemHandler = ([String: Any], UIAction) -> Void; - func createAction(handler: @escaping ActionItemHandler) -> UIAction { - #if DEBUG - print("RNIMenuActionItem, makeUIAction..."); - #endif - + func createAction(handler: @escaping ActionItemHandler) -> UIAction { let action = UIAction( title : self.actionTitle, image : self.icon?.image, diff --git a/ios/src/ReactNative/RNIContextMenu/RNIMenuItem.swift b/ios/src/ReactNative/RNIContextMenu/RNIMenuItem.swift index b7890042..d0bf9815 100644 --- a/ios/src/ReactNative/RNIContextMenu/RNIMenuItem.swift +++ b/ios/src/ReactNative/RNIContextMenu/RNIMenuItem.swift @@ -79,24 +79,15 @@ class RNIMenuItem: RNIMenuElement { guard let dictItem = $0 as? NSDictionary else { return nil }; if let menuItem = RNIMenuItem(dictionary: dictItem) { - #if DEBUG - print("RNIMenuItem, init - compactMap: Creating RNIMenuItem..."); - #endif return menuItem; } else if let menuAction = RNIMenuActionItem(dictionary: dictItem) { - #if DEBUG - print("RNIMenuItem, init - compactMap: Creating RNIMenuActionItem..."); - #endif return menuAction; } else if let deferredElement = RNIDeferredMenuElement(dictionary: dictItem) { return deferredElement; } else { - #if DEBUG - print("RNIMenuItem, init - compactMap: nil"); - #endif return nil; }; }; diff --git a/ios/src/ReactNative/RNIContextMenuButton/RNIContextMenuButton.swift b/ios/src/ReactNative/RNIContextMenuButton/RNIContextMenuButton.swift index d5ad9ac8..3bd392a5 100644 --- a/ios/src/ReactNative/RNIContextMenuButton/RNIContextMenuButton.swift +++ b/ios/src/ReactNative/RNIContextMenuButton/RNIContextMenuButton.swift @@ -73,13 +73,6 @@ class RNIContextMenuButton: UIButton { let rootMenuConfig = RNIMenuItem(dictionary: rawMenuConfig) else { return }; - - #if DEBUG - print("RNIContextMenuButton" - + " - menuConfig didSet" - + " - RNIMenuItem init" - ); - #endif // cleanup `deferredElementCompletionMap` self.cleanupOrphanedDeferredElements(currentMenuConfig: rootMenuConfig); @@ -321,12 +314,6 @@ extension RNIContextMenuButton { // context menu display begins override func contextMenuInteraction(_ interaction: UIContextMenuInteraction, willDisplayMenuFor configuration: UIContextMenuConfiguration, animator: UIContextMenuInteractionAnimating?) { super.contextMenuInteraction(interaction, willDisplayMenuFor: configuration, animator: animator); - - #if DEBUG - print("RNIContextMenuButton, UIContextMenuInteractionDelegate" - + " - contextMenuInteraction: will show" - ); - #endif self.isContextMenuVisible = true; @@ -340,12 +327,6 @@ extension RNIContextMenuButton { override func contextMenuInteraction(_ interaction: UIContextMenuInteraction, willEndFor configuration: UIContextMenuConfiguration, animator: UIContextMenuInteractionAnimating?) { super.contextMenuInteraction(interaction, willEndFor: configuration, animator: animator); - #if DEBUG - print("RNIContextMenuButton, UIContextMenuInteractionDelegate" - + " - contextMenuInteraction: will hide" - ); - #endif - guard self.isContextMenuVisible else { return }; self.onMenuWillHide?([:]); diff --git a/ios/src/ReactNative/RNIContextMenuView/RNIContextMenuView.swift b/ios/src/ReactNative/RNIContextMenuView/RNIContextMenuView.swift index a05dabb2..6c10326c 100644 --- a/ios/src/ReactNative/RNIContextMenuView/RNIContextMenuView.swift +++ b/ios/src/ReactNative/RNIContextMenuView/RNIContextMenuView.swift @@ -116,13 +116,6 @@ class RNIContextMenuView: UIView { menuConfig.shouldUseDiscoverabilityTitleAsFallbackValueForSubtitle = self.shouldUseDiscoverabilityTitleAsFallbackValueForSubtitle; - - #if DEBUG - print("menuConfig didSet" - + " - RNIMenuItem init" - + " - menuConfig count: \(menuConfigDict.count)" - ); - #endif self.updateContextMenuIfVisible(with: menuConfig); @@ -457,14 +450,8 @@ fileprivate extension RNIContextMenuView { /// create `UIMenu` based on `menuConfig` prop func createMenu(_ suggestedAction: [UIMenuElement]) -> UIMenu? { - guard let menuConfig = self._menuConfig else { - #if DEBUG - print("RNIContextMenuView, createMenu" - + " - guard check failed, menuConfig: nil" - ); - #endif - return nil; - }; + guard let menuConfig = self._menuConfig + else { return nil }; return menuConfig.createMenu(actionItemHandler: { // A. menu item has been pressed... @@ -554,13 +541,7 @@ fileprivate extension RNIContextMenuView { self.isContextMenuVisible, let interaction: UIContextMenuInteraction = self.contextMenuInteraction else { return }; - - #if DEBUG - print("menuConfig didSet" - + " - Updating visible menu" - ); - #endif - + // context menu is open, update the menu items interaction.updateVisibleMenu { _ in return menuConfig.createMenu( @@ -1149,12 +1130,6 @@ extension RNIContextMenuView: UIContextMenuInteractionDelegate { willDisplayMenuFor configuration: UIContextMenuConfiguration, animator: UIContextMenuInteractionAnimating? ) { - - #if DEBUG - print("RNIContextMenuView, UIContextMenuInteractionDelegate" - + " - contextMenuInteraction: will show" - ); - #endif self.isContextMenuVisible = true; self.onMenuWillShow?([:]); @@ -1201,12 +1176,6 @@ extension RNIContextMenuView: UIContextMenuInteractionDelegate { willEndFor configuration: UIContextMenuConfiguration, animator: UIContextMenuInteractionAnimating? ) { - - #if DEBUG - print("RNIContextMenuView, UIContextMenuInteractionDelegate" - + " - contextMenuInteraction: will hide" - ); - #endif guard self.isContextMenuVisible else { return }; @@ -1243,12 +1212,6 @@ extension RNIContextMenuView: UIContextMenuInteractionDelegate { willPerformPreviewActionForMenuWith configuration: UIContextMenuConfiguration, animator: UIContextMenuInteractionCommitAnimating ) { - - #if DEBUG - print("RNIContextMenuView, UIContextMenuInteractionDelegate" - + " - contextMenuInteraction: preview tapped" - ); - #endif // MARK: Experimental - "Auxiliary Context Menu Preview"-Related // hide preview auxiliary view