maui icon indicating copy to clipboard operation
maui copied to clipboard

Unified iOS TabbedViewHandler

Open PureWeen opened this issue 1 month ago • 0 comments

Unified iOS TabbedViewHandler

Target: .NET 10


Goal

Implement TabbedViewHandler for iOS, replacing the legacy TabbedRenderer. Learn from both the existing TabbedRenderer implementation and Shell's tab handling to build a unified handler that both TabbedPage and Shell can use.


Background

  • WinUI already has a shared tab handling approach
  • iOS currently uses TabbedRenderer (in Microsoft.Maui.Controls.Handlers.Compatibility)
  • TabbedViewHandler exists but throws NotImplementedException on iOS (see issue #29540)
  • Shell has its own tab bar implementation that duplicates much of the same logic

Rollout Strategy

  1. Implement TabbedViewHandler for .NET 10

  2. Gate behind AppContext switch - Wire TabbedPage to use the new handler when the switch is enabled

  3. Switch disabled by default initially - Allows testing and validation without affecting existing apps

  4. Enable for TabbedPage and Shell - Once validated, flip the switch to make it the default path


Guidelines

  1. Implement TabbedViewHandler.CreatePlatformView() on iOS - Currently throws NotImplementedException

  2. Learn from TabbedRenderer - Extract the best patterns for UITabBarController management, tab icons, selected/unselected colors

  3. Learn from Shell tab handling - Incorporate patterns that work well for Shell's tab bar

  4. TabbedPage and Shell both use it - Same handler, different consumers

  5. Keep handler internal initially - Flexibility to iterate without public API commitment

  6. Align with WinUI patterns - Use WinUI's unified approach as the reference model


Success Criteria

  • TabbedViewHandler works on iOS (no more NotImplementedException)
  • TabbedPage uses the new handler (when switch enabled)
  • Shell can use the same handler for tabs (when switch enabled)
  • All existing TabbedPage tests pass with switch enabled
  • All existing Shell tab tests pass with switch enabled

PureWeen avatar Dec 09 '25 22:12 PureWeen