使 UITabViewController 中的一些但不是所有选项卡可重新排序

Make some but not all tabs in an UITabViewController reorderbable

是否有可能在 iOS 12+ 的 UITabbarController 中使一些但不是所有选项卡可重新排序?

我在情节提要中寻找相关的 UITabbarDelegate 或选项,但这没有成功。

我的想法是使用委托函数 func tabBar(_ tabBar: UITabBar, willBeginCustomizing items: [UITabBarItem]) 并使用可排序项目调用超级实现。但是这个没有效果。

class TabbarController: UITabBarController
{
    override func tabBar(_ tabBar: UITabBar, willBeginCustomizing items: [UITabBarItem]) {
        super.tabBar(tabBar, willBeginCustomizing: [items.first!])
    }
}

摘自 here.

By default, the user is allowed to rearrange all items on the tab bar. If you do not want the user to modify some items, though, you can remove the appropriate view controllers from the array in the customizableViewControllers property.

是您要找的吗?