Remove TabBar item in Swift

前端 未结 5 1213
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-06 05:17

I currently try to find a way to remove while run the app a TabBar Item, i found a way to enable or disable it but not to complete remove it.

For disable it i do:

5条回答
  •  天涯浪人
    2020-12-06 05:48

    Swift 4.1 For removing More items Use Array

    let index = [2,0]
    index.forEach{viewControllers?.remove(at: $0)}
    

    the point in the array is You Should Use Descending Order of indexes to remove to get the desired Result.

提交回复
热议问题